parallel
[Top][All Lists]
Advanced

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

how to use gnu parallel and grep with a space


From: Shantanu Unknown
Subject: how to use gnu parallel and grep with a space
Date: Sun, 11 May 2014 09:31:13 +0000

Hello,
I am trying to use gnu parallel and grep as follows

cat tmp | parallel -j1 grep  "^{} " ~/datafile.txt 
(notice one space between {} and ")
One line in tmp contains 101
and unfortunately with the above statement I get
101 299.2599 -3.6514901
1013 185.00003 -6.7468192
1014 188.6323 9.7729794

which I don't want
grep "^101 " datafile.txt works fine though
I changed grep  "^{} "
with grep  "^{}\"
but that too gives same results as before.
Is there an easy solution for this?
Thanks
shantanu

reply via email to

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