Originally Posted by MTK358
If you want the result in a different file:
sed -r 'expression' source_file > dest_file
If you want the original file to be overwritten with the new data:
sed -i -r 'expression' file
Hopefully you can figure it out now.
EDIT: Also, you shold NEVER
use ls output in a script. It's meant for human reading only.
Use this instead to loop over files in a directory:
for FILE in *
Ok am mega confused now sorry
The guy in this post made that code I posted above
It was for renaming alot files and it worked just fine
Only the start of the file names have changed everything else Ive wrote in this thread still is the same
Am really really new to linux and you say never use output, I have no idea what your talking about sorry :C
Thanks for the help btw