I seem to be confused about how to use "perl -pie" from the command line. I want to use "perl -pie" at the command line to add the string "-x /tmp/ccc" to the tmpwatch command. I am trying this ...
$ /usr/bin/perl -pie 's/^(\/usr\/sbin\/tmpwatch.\*) (\d+ \/tmp)/\$1 -x
+ \/tmp\/ccc \$2/' /tmp/tmpwatch
Can't open perl script "s/^(\/usr\/sbin\/tmpwatch.\*) (\d+ \/tmp)/\$1
+-x \/tmp\/ccc \$2/": No such file or directory.
Use -S to search $PATH for it.
... but this is what happens ...
Can't open perl script "s/^(\/usr\/sbin\/tmpwatch.\*) (\d+ \/tmp)/\$1
+-x \/tmp\/ccc \$2/": No such file or directory.
Use -S to search $PATH for it.
What am I doing wrong here?