[Next] [Up] [Previous] [Contents]
Next: Things to try Up: Miscellaneous tips Previous: Loops in scripts

More tricks

Every word of a file can be placed on a separate line by typing


    cat old_filename | tr -cs A-Za-z '\012' > new_filename
The following lists all words in filename in alphabetical order.


    cat filename | tr -cs A-Za-z '\012' | tr A-Z a-z | sort | uniq
You can find out when the file .rhosts was last modified by typing


    echo .rhosts last modified on `/bin/ls -l .rhosts | cut -c33-44`
Typing head -n displays the first n lines of a file. And typing last lists the last logins.


c.c.taylor@ieee.org