Jump to content

saving to all files with sed [solved]


Recommended Posts

I have a shell script here that I'm trying to use, pretty self-explanitory, I just need help getting sed to correctly write to the files.

Here's what I have:

 

echo "Input directory:"
read dir
echo "Input original string:"
read str1
echo "Input final string:"
read str2
cd $dir
sed s/$str1/$str2/ * > *

The problem, of course, is that sed then writes it to a file called '*'. How do I make it write to the file it pulled it from?

Edited by Urza9814
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...