I want to do the following but have no clue. Please suggest.
1) I want to search in a file "config.txt" for a line that started with "*" follow by anything, then "LOG" then "one or more tab" then /var/log (ex: *124adfadf;*LOG /var/log). If I found this line I want to remove "LOG" and save the file
sed -e '/^\*.*LOG/b' -e .... config.txt >config.txt.$$ && mv config.txt.$$ config.txt
2) I want to search in a file "config.txt" for a line that contains "/GOT/IT" and remove it.
sed ..... config.txt >config.txt.$$ && mv config.txt.$$ config.txt
Thanks a lot
1) I want to search in a file "config.txt" for a line that started with "*" follow by anything, then "LOG" then "one or more tab" then /var/log (ex: *124adfadf;*LOG /var/log). If I found this line I want to remove "LOG" and save the file
sed -e '/^\*.*LOG/b' -e .... config.txt >config.txt.$$ && mv config.txt.$$ config.txt
2) I want to search in a file "config.txt" for a line that contains "/GOT/IT" and remove it.
sed ..... config.txt >config.txt.$$ && mv config.txt.$$ config.txt
Thanks a lot