Hi Guys,
I've to print a block of lines that starts with a keyword CREATE and ends with ; using awk command is there a way to do this?
awk '{if ($1=="CREATE" ) {print $0}}' filename.
This will print only the line that has CREATE but I want to search multiple lines and if there is a ";" in any of line it should print all the lines from CREATE till ;
Any thoughts please?
---------- Post updated at 05:45 PM ---------- Previous update was at 05:30 PM ----------
The below statement is working
cat filename | awk '/CREATE/,/;/'