Awk

Examples
print first word of each input line

$ awk '{print $1}'

special ls:

$ ls | awk 'BEGIN{x=0}{printf("file #%2d: \"%s\"\n", ++x, $1);}'

a little sine(swine?)-table:

$ awk 'BEGIN{for(x=0;x<3.142*2;x+=3.142/10) printf("svin(%.1f) = % .3f\n", x, sin(x));}'


 * convert a file with this format:

#SekretÃ¦r Kirsten Hyltoft 23 Svend Hubert Ã˜lgod: username00 (DOS-newline) Ã…ge Gunnar Erik Ã†kelsen: username01 (DOS-newline)
 * to this format:

#SekretÃ¦r Kirsten Hyltoft 23 svend.oelgod: username00 aage.aekelsen: username01 $ awk '{if(NR>1 && NF>3) {print tolower($1) "." tolower($(NF-2)) " " $(NF-1);} else print $0}' $1 | \ sed -e 's/Ã¦/ae/g' -e 's/Ã¥/aa/g' -e 's/Ã¸/oe/g' -e 's/Ã¼/ue/g' -e 's/Ã¶/oe/g' >$2