Hey guys I'm stuck. I have been trying to write a sed or perl script to change the below. But each time I run the sed script or perl it completely zeros out the file.
I want to change this
/opt/dragon/bin/runit
to this
cd /opt/dragon/bin; /opt/dragon/bin/runit
#!/bin/bash
for fl in *.php; do
mv $fl $fl.old
sed 's/old/new/g' $fl.old > $fl
rm -f $fl.old
done