Urza9814 Posted January 21, 2007 Share Posted January 21, 2007 (edited) 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 January 21, 2007 by Urza9814 Link to comment Share on other sites More sharing options...
neddie Posted January 21, 2007 Share Posted January 21, 2007 -i Link to comment Share on other sites More sharing options...
Urza9814 Posted January 21, 2007 Author Share Posted January 21, 2007 oh crap. I was looking all around on google for it when I shoulda just read the help a bit more closely. thanks. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now