Hi,
I would like to remove all lines containing a specified pattern from all files in a folder. I know that the command
does the first part i.e. removes all lines containing a specified pattern from a specific file. How can I achieve this for all files in a folder?Code:grep -v "patternr" ./file > temp && mv temp file
I tried something like this but it does not work.
Do I need necessarily iterate over the files of the folder or there is a more simple way?Code:grep -Rv "pattern" ./folder > temp && mv temp file
Thank you
Bookmarks