AWK question

Ted Richards ted at ecr2.UUCP
Fri Aug 9 02:15:43 AEST 1985


The problem with the statement

	awk '$5 >= $dt' ...

is that the "$dt" is inside single quotes and gets passed literally to awk.
What you want is for the shell to expand the "$dt" (but not the "$5"!).
Try something like:

	echo '$5 >=' $dt >/tmp/whatever
	awk -f /tmp/whatever ...



More information about the Comp.unix mailing list