Apache Awk Bash C cftp daemontools DHCP djbdns DNS Emacs Email ezmlm Fetchmail find GDB Hardware HTML HTTP Intro ISDN less Make Math mc mirrordir MySQL Peripherals Perl PHP3 pppd qmail Regexps Shell System Tables test To do Typical ucspi-tcp Versions Index TCP/IP slides
 

awk oneliners

To print example.txt between the first appearance of foo and the following appearance of bar (both included)
awk '/foo/,/bar/' example.txt
To print the names for all users in the passwd file
awk -F: '{ print $1; }' /etc/passwd
... and to print all excepting root and ftp
awk -F: '!/^(ftp)|(root)/ { print $1; }' /etc/passwd

awk related links

Last update: Wed, 2 Nov 2005 10:16:21 GMT