Today I spent a day trying to do the following.
Let's say I have a file of Fortran code.
I want to change everything in this file to lower case. But if a line starts with a specific character or word, this line should not be changed.
For example, the following command
sed -i -e '/^!/! s/\(.*\)/\L\1/' $filein
does what I want, it does change everything to lower case, omitting comments (lines started with "!") or
sed -i -e '/^#include/! s/\(.*\)/\L\1/' $filein
omits lines starting with "#include" word.
Question: how to combine those two commands into one?
So basically I need to add "or" under the first condition. I have tried multiply options without any luck. I guess it should be something simple.