![]() |
|
|
|
|
|||||||
| UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| In Help, Substitute Text ... | solidhelix08 | Shell Programming and Scripting | 6 | 02-07-2008 01:21 AM |
| how to write perl substitute command in shell scripts | param_it | UNIX for Dummies Questions & Answers | 3 | 07-03-2007 01:09 AM |
| Substitute File name | vanand420 | Shell Programming and Scripting | 22 | 03-13-2007 10:40 PM |
| Substitute in vi | kingdbag | UNIX for Dummies Questions & Answers | 5 | 01-17-2007 10:42 AM |
| Substitute Command in vi | lesstjm | UNIX for Dummies Questions & Answers | 10 | 03-28-2005 10:11 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
Problem with cat with PERL Substitute
system("cat FILENAME | perl -e 'while(<>) { print $_;}'");
system("cat FILENAME | perl -e 'while(<>) { $_ =~ s/XXX/YYY/g; print $_;}'"); First command works fine but second command gives the following error: syntax error at -e line 1, near "{ =~" syntax error at -e line 1, near ";}" Execution of -e aborted due to compilation errors. Any idea why? - Jingi |
| Forum Sponsor | ||
|
|
|
|||
|
when i put that system statement in a perl script, it gave those errors.
then this worked: Code:
system ("cat FILENAME | perl -e 'while(<>) { s/XXX/YYY/g; print $_;}'");
|
|||
| Google UNIX.COM |