I am trying to us the perl -pi -e to edit the a line in a xml file. If I run the perl -pi -e command from the command line it works fine, but once I put in my script and use the
You need to add quote marks around the argument you pass to -c.
-c
At the moment you have -c perl and then -pi is taken as another argument to su not perl.
-c perl
-pi
su
perl