Bash: check window size after each command