Quote:
Originally Posted by talat
#ls > lisofallfile
Then i run this script
#/bin/sh
while read line; do
/bin/sed 's/\/var\/www\/html/\/var\/www\/html\/khi/g' < $line > tempfile
cat tempfile > $line
done < listofallfiles
|
Code:
sed -i 's/pattern/replacement/g' *
this will modify the files in place. If you're just doing an ls, then '*' should work fine.