[Tfug] Got a text formatting/database question ("bash" it to hell?)
Choprboy
choprboy at dakotacom.net
Wed Apr 15 02:57:10 MST 2009
On Tuesday 14 April 2009 23:05, Jim March wrote:
> > On Tue, Apr 14, 2009 at 07:10:31PM -0700, Choprboy wrote:
> >> cat file.dat |awk -F "," "{print $2}' |grep -e '^170$' |wc -l
[snip]
> Heh. I found myself wondering if it would work, so I tried...nope.
> Gives me a new ">" prompt at which point ctrl-c is the only answer?
>
Oops.... Typo in quickly typing it... There is an unmatched "/' set around the
awk print command, so bash it waiting for the closing parentheses.
The correct would be:
cat file.dat |awk -F "," '{print $2}' |grep -e '^170$' |wc -l
Or... to appease Claude:
awk -F "," '{print $2}' <file.dat |grep -e '^170$' |wc -l
More information about the tfug
mailing list