Hi,
I have a file which contains data in this format
# User@Host: abc @ [3.210.193.65] Id: 0000000
# Query_time: 0.000070 Lock_time: 0.000000 Rows_sent: 1 Rows_examined: 0
SET timestamp=00000000;
SELECT @@version, @@version_comment;
# User@Host: abcd @ [3.210.193.65] Id: 00000000
# Query_time: 0.000228 Lock_time: 0.000070 Rows_sent: 40 Rows_examined: 40
SET timestamp=00000000;
SELECT * FROM information_schema.CHARACTER_SETS;
# User@Host: abcde @ [3.210.193.65] Id: 000000000
# Query_time: 0.000002 Lock_time: 0.000000 Rows_sent: 0 Rows_examined: 0
SET timestamp=00000000;
SET NAMES 'utf8';
# User@Host: abcdef @ [3.210.193.76] Id: 0000000
# Query_time: 0.000022 Lock_time: 0.000000 Rows_sent: 0 Rows_examined: 0
SET timestamp=00000000;
SET NAMES 'utf8';
Want to take values which contains select queries only.
Output file should be like this
# User@Host: abc @ [3.210.193.65] Id: 0000000
SELECT @@version, @@version_comment;
# User@Host: abcd @ [3.210.193.65] Id: 00000000
SELECT * FROM information_schema.CHARACTER_SETS;
Please suggest.:wall:
---------- Post updated at 09:37 PM ---------- Previous update was at 09:36 PM ----------
the input file contains many other entries like this.Pasted only a part of that file.