Skip to content

Instantly share code, notes, and snippets.

@TauPan
Created April 11, 2012 14:22
Show Gist options
  • Save TauPan/2359615 to your computer and use it in GitHub Desktop.
Save TauPan/2359615 to your computer and use it in GitHub Desktop.
adapt terminal settings to a remote serial line
#!/bin/sh
stty size|awk '{print "export TERM=screen;export LINES=" $1 ";export \
COLUMNS=" $2 ";stty rows $LINES;stty cols $COLUMNS;reset"}'
# /etc/screenrc:
# register f '^A:exec .!. pastescreensize.sh^M'
# bind + process f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment