One Quickie

Using awk to print fields (Unix->General)
Here's a way to have awk print all fields (separated by spaces) from each line, except for fields number 1 and 9 (starting with a count of 1):
% awk '{ for (f=1; f <= NF; f++) { if (f != 1 && f != 9) printf("%s ", $f);} printf("
");}' < ook.txt
Or you can put this at the end of a pipeline instead of directing a text file into the command. (courtesy of DougEDoug)

borkware home | products | miniblog | rants | quickies | cocoaheads
Advanced Mac OS X Programming book