The following command is working as expected.
# some command | awk '/(<^create>|<^alter>|<^drop>)/,/;/'
create table todel1 (id int) max_rows=2
/*!*/;
alter table todel1 engine=InnoDB
/*!*/;
create database common
/*!*/;
create database rules
/*!*/;
But it matches only the lower case "create", "alter" etc. I want to use IGNORECASE switch in the awk statement so that it will return all instances of the search term.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…