It's been a while sorry but I forgot how.
grep /folder something *
I don't know am I even close?
Just to be clear, I have a directory with thousands of files and one term on every file I need changed to something else.
Thank you for you help.
Chaze
It's been a while sorry but I forgot how.
grep /folder something *
I don't know am I even close?
Just to be clear, I have a directory with thousands of files and one term on every file I need changed to something else.
Thank you for you help.
Chaze
Here are some samples of batch file renaming that I saved from somewhere.
# change .htm files to .html
for file in *.htm ; do mv $file `echo $file | sed 's/\(.*\.\)htm/\1html/'` ; done
# change .html files to .htm
for file in *.html ; do mv $file `echo $file | sed 's/\(.*\.\)html/\1htm/'` ; done
#change .html files to .shtml
for file in *.html ; do mv $file `echo $file | sed 's/\(.*\.\)html/\1shtml/'` ; done
A modification of this looks like what you want.
Originally Posted by squirrel
Perfect, thanks!
You can also use the commands "sed" and "replace" which are usually just as effective.
Beau Henderson
thanks, I'm not familar with this can you post a example for changing text for several files in a directory.Originally Posted by haze
Yes, i would like to know it tooOriginally Posted by DWHS.net
![]()
It's me ...... It's me ......
This is where man pages usually come in handyOriginally Posted by DWHS.net
replace "old-string" "new-String" -- *.ext
replace "old-string" "new-String" -- *
replace "old-string" "new-String" -- filename
Beau Henderson