parallel
[Top][All Lists]
Advanced

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

Re: how to use gnu parallel and grep with a space


From: V A Ramesh
Subject: Re: how to use gnu parallel and grep with a space
Date: Mon, 12 May 2014 10:40:03 +0530
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0

Try using 'grep -w' its grep word match.

cheers

V  A Ramesh

On 11/05/14 15:01, Shantanu Unknown wrote:
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


-- 
Vakkalagadda A Ramesh
Jr. Research Fellow
Lab of Computational Biology
Centre for DNA Fingerprinting and Diagnostics (CDFD)
Nampally
Hyderabad-500001
Lab: 040-24749368
Mobile: 08686363632

reply via email to

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