In my crontab, I reference a shell script,
print-size, that contains the following lines.
#!/bin/sh tmux new-session -t check-size -d tmux send-keys -t check-size 'echo $COLUMNS $LINES' C-m
When this script executes as a cron job, it prints
80 23, apparently because the default terminal size is 80x24. If I execute this shell script from a terminal window, it prints the size of that terminal window (minus one line for tmux's status line).
Is there a way to influence the size of the tmux window so the above script will print something different, say
132 42, in a cron job?
If it matters, this is for Ubuntu 14.04 but I suspect the same behavior in any *nix.