On Thu, 9 Apr 2009 15:32:51 +0200 (CEST), Oliver Fromme <o...@lurza.secnetix.de> wrote: > If ";" is the delimiter character, you need to tell awk > about it (i.e. use the -F option). This one should work: > > awk -F';' '$3 ~ /^[a-z]{5}$/ {print}' file
You can even omit {print} because it's the default action (to print the whole line, i. e. $0) when no action is given for a pattern. % awk -F';' '$3 ~ /^[a-z]{5}$/' file When using this in a shell, keep an eye on eventually needed quoting or escaping of $. -- Polytropon >From Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"