am using
!/bin/bash
for fl in *.txt; do
mv $fl $fl.old
sed 's/files.php?file=/file/g' $fl.old > $fl
rm -f $fl.old
done
I need the output replaced with file/ not only file ,
couldnt figure it out
linuxsed
am using
!/bin/bash
for fl in *.txt; do
mv $fl $fl.old
sed 's/files.php?file=/file/g' $fl.old > $fl
rm -f $fl.old
done
I need the output replaced with file/ not only file ,
couldnt figure it out
Best Answer
Use:
Notice the
\
used to escape the/
afterfile
in the replacement ...