SCREEN COMMUNICATION
echo
- a command mainly used in shell scripts. Examples:
$ echo "Hello" # will print Hello on your screen
$ echo "Hello" > /dev/tty616 # will print Hello on someone elses screen (warning - can crash their screen!)
$ echo $DESTF10 # will print the value of the environment variable DESTF10
$ echo "\033Fdemo demo" # will echo demo to the status bar at the top of a wyse terminal
See also file shellscripts
read
- will read text from standard input and place it in the variable name specified. See file shellscripts
line
- waits until the user presses return before carrying on (writes what is typed to standard output). If used in a crontab/at job this instruction is ignored. See file shellscripts
talk
- set up an interactive communication dialogue box between two users. Looks good but isn't really that useful.
write
- writes a message to someone elses screen. Try typing 'write root' and then type a message, finishing with control-D.
banner
- writes in huge letters across your screen! (max: 10 chars per word)
wall
- send a message to all people on a system. Can only be executed by root (I think).
tput
- tty type independent attribute setting (requires TERM variable and TERMCAP to be set). I only know these few bits:
- tput cnorm - turns the screen cursor on
- tput civis - turns the screen cursor off
- tput clear - clears the screen
- tput smso - turns all new text to bold
- tput rmso - turns all bold text off
tee (-a)
- command used in pipes to take a copy of the standard output. e.g.
$ ls | tee /tmp/x # would output ls normally and put a copy in /tmp/x. The option '-a' is used to append rather than replace files.
No comments:
Post a Comment