Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    [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.


  2. #2
    Linux User
    Join Date
    Jan 2007
    well, one way is to connect the continuations, perhaps
    like this--

    tr \\ " " <filename | tr -d "\n" | tr -s " " >new.filename

    and then grep
    the sun is new every day (heraclitus)

  3. #3

    Thumbs up Here is the solution

    Found it from a friend.

    grep -A1 "heart.*at" prop.txt

    heartbeat \
    more beats

  4. $spacer_open

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts