The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #5 (permalink)  
Old 03-18-2008
cooldude cooldude is offline
Registered User
  
 

Join Date: Mar 2006
Posts: 44
Yes, I used $1 instead of \1. I think it makes no difference.
When I have patterns that don't have new lines in them, such as:

Code:
  func_a(3);

Doing

Code:
perl -p -e "s/func_a\((.*)?\);/func_b($1,\n6)/s" < file |more

works as expected.