KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I am trying to loop through all the files in a directory. I want to do some stuff on each file (convert it to xml, not included in example), then write the file to a new directory structure. for file in `find /home/devel/stuff/static/ -iname "*.pdf"`; do echo $file; sed -e 's/static/changethis/' $file > newfile +".xml"; echo $newfile; done I want the results to be: $file => /home/devel/stuff/static/2002/hello.txt $newfile => /home/devel/stuff/changethis/2002/hello.txt.xml How do I have to change my sed line?
Tags (comma-separated)
Save Edits
Cancel