parallel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: problem using parallel with awk


From: Hans Schou
Subject: Re: problem using parallel with awk
Date: Sun, 28 Nov 2010 16:22:41 +0100 (CET)
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)

On Fri, 26 Nov 2010, Shantanu Unknown wrote:

Hi,I have started using parallel recentllyHOwever it is not working correctly 
with awk

find 201011* -name pre_create_scamp_inputs.out | parallel awk "'/Executing/ {print 
$2}' {}"
This prints the whole line and not $2.
the xargs argument works

find 201011* -name pre_create_scamp_inputs.out | xargs awk '/Executing/ {print 
$2}'
Am I doing something wrong n the parallel syntax while calling awk?
thanks

You need a \ before $2, like:
 find 20* -name foo | parallel awk "'/Executing/ {print \$2}'"

/hans
--
Horsebakken 78, DK-2400 København NV

reply via email to

[Prev in Thread] Current Thread [Next in Thread]