Len Conrad <lcon...@go2france.com> wrote: > > We need to print a line when the 3rd field (with trailing ";" > delimiter) is, eg, exactly 5 lower case characters > > awk ' $3 ~ /^[a-z]{5,5};$/ {print $0} ' file > > ... doesn't work.
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 If that still doesn't work for you, please specify your file format more exactly, and provide an example of the input lines. Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd "anyone new to programming should be kept as far from C++ as possible; actually showing the stuff should be considered a criminal offence" -- Jacek Generowicz _______________________________________________ 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"