the following command works beautifully. it basically grabs the content of a file from First to End, then excludes any lines containing specific patterns.
i never had any issues with the command until I ran it on a Ubuntu box 13.04. when i ran it against a datafile, I got back no response. Nothing was outputted to the screen. It wasnt until I installed gawk on the system that the command started to work.
can anyone help me rewrite this command to make it more portable with default versions of awk? i dont want to have to install gawk. this script will be run on a a client machine and they dont like having to install anything on their system because they fear it'll break something else.
it doesnt look like awk is going to be reliable here. but sed seems to be.
i found this command online:
sed -n '/ABC/,/^[^+]/{x;/^$/!p;}' file
and i modified it to look like this:
sed -n '/^First/,/^End$/ {x ; /#\/bin\/sh|not.*commonly|#/!p;}'
which seems to work. but dont know if im reading the command correctly. i take it, im storing everything between and including lines from "First" to "End" to variable x. then, im only printing lines from variable x which do not contain the strings