Results 1 to 3 of 3
Hi guys
when I do a grep on a string if the result line has an ending \ and have continuation on the next line, I am not getting that ...
- 09-28-2009 #1Just Joined!
- Join Date
- Sep 2009
- Posts
- 8
[SOLVED] overriding \ in a grep search
Hi guys
when I do a grep on a string if the result line has an ending \ and have continuation on the next line, I am not getting that result on the next line.
Please help if there is an easy way to override this.
Leo
- 09-28-2009 #2Linux User
- Join Date
- Jan 2007
- Location
- cleveland
- Posts
- 452
well, one way is to connect the continuations, perhaps
like this--
tr \\ " " <filename | tr -d "\n" | tr -s " " >new.filename
and then grepthe sun is new every day (heraclitus)
- 09-29-2009 #3Just Joined!
- Join Date
- Sep 2009
- Posts
- 8
Here is the solution
Found it from a friend.
grep -A1 "heart.*at" prop.txt
Result:
----------
heartbeat \
more beats


