hello all,

   I appreciate everyone that got me going in the right direction with a
sed alternative. After some searching I even found a way to get it to
search recursive and add an extension to the end IE .html or .php and it
is working wonderfully. Now for the part I haven't gotten a grasp on yet
the handling of special characters. The situation I'm dealing with right
now is converting a string hostbyk.com//order to hostbyk.com/order in
like 100+ html files. how would I do that with the following.

#!/bin/sh

# Need some information from you
echo "what directory do you wish to search in?"
read dir
echo""
echo "what extension?"
read ext
echo""
echo "what word or string are we looking for?"
read old
echo ""
echo "what do you wish to replace it with"
read new

cd $dir
perl -p -i -e 's/'$old/$new'/g' $(find . -name \*.$ext

thank you,
-- 
Jerry M. Howell II

email admin: usalug.org

sys admin:   hostbyk


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to