perl and sed how to combine if and unless in perl
Posted
by yael
on Stack Overflow
See other posts from Stack Overflow
or by yael
Published on 2010-05-27T09:33:27Z
Indexed on
2010/05/27
9:51 UTC
Read the original article
Hit count: 801
perl
I have the two perl command
perl -pe "s/\b$a\b/$b/g if m/param1 /" test
and
perl -pe "s/\b$a\b/$b/g unless /^#/" test
how to use combine the if m/somthing/ and the unless /something/
for example
[root@localhost tmp]# perl -pe "s/\b$a\b/$b/g if m/param1/ unless /^#/" test
syntax error at -e line 1, near "m/param1/ unless"
but its now work THX
© Stack Overflow or respective owner