Find the answer to your Linux question:
Results 1 to 3 of 3
perl -w -i -p -e "s/search_text/replace_text/g" filename How do I, in the search_text spot, get it to search for an & sign? Is there a special way to include such?...
  1. #1
    Just Joined!
    Join Date
    Apr 2008
    Posts
    18

    [SOLVED] Looking for &

    perl -w -i -p -e "s/search_text/replace_text/g" filename

    How do I, in the search_text spot, get it to search for an & sign? Is there a special way to include such?

  2. #2
    Linux User
    Join Date
    May 2008
    Location
    NYC, moved from KS & MO
    Posts
    251
    Use "\" in front of "&" or "?" to escape them.

  3. #3
    Just Joined!
    Join Date
    Apr 2008
    Posts
    18
    Worked like a charm. Thank you!

Posting Permissions

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