hello,
is there any mistake in separator list given as
Code:
"[\[|\/|\]]"
The first two separators [ and / seems to work but the last ] not.
Code:
$ grep saved out|tail -10
2015-03-10 11:12:12 (846 KB/s) - 'U862861.bff' saved [345088/345088]
2015-03-10 11:12:13 (39.9 MB/s) - 'U862862.bff' saved [6144/6144]
2015-03-10 11:12:13 (58.3 MB/s) - 'U862863.bff' saved [8192/8192]
2015-03-10 11:12:13 (49.2 MB/s) - 'U862864.bff' saved [7168/7168]
2015-03-10 11:12:13 (38.8 MB/s) - 'U862865.bff' saved [6144/6144]
2015-03-10 11:12:13 (41.7 MB/s) - 'U862866.bff' saved [5120/5120]
2015-03-10 11:12:13 (43.4 MB/s) - 'U862867.bff' saved [6144/6144]
2015-03-10 11:12:14 (42.7 MB/s) - 'U862868.bff' saved [7168/7168]
2015-03-10 11:12:14 (44.8 MB/s) - 'U862869.bff' saved [5120/5120]
2015-03-10 11:12:14 (28.2 MB/s) - 'U862870.bff' saved [13312/13312]
$ grep saved out|tail -10|awk -F"[\[]" '{print $NF}'
345088/345088]
6144/6144]
8192/8192]
7168/7168]
6144/6144]
5120/5120]
6144/6144]
7168/7168]
5120/5120]
13312/13312]
$ grep saved out|tail -10|awk -F"[\[|\/]" '{print $NF}'
345088]
6144]
8192]
7168]
6144]
5120]
6144]
7168]
5120]
13312]
$ grep saved out|tail -10|awk -F"[\[|\/|[highlight #AD7FA8]\][/highlight]]" '{print $NF}'
2015-03-10 11:12:12 (846 KB/s) - 'U862861.bff' saved [345088/345088]
2015-03-10 11:12:13 (39.9 MB/s) - 'U862862.bff' saved [6144/6144]
2015-03-10 11:12:13 (58.3 MB/s) - 'U862863.bff' saved [8192/8192]
2015-03-10 11:12:13 (49.2 MB/s) - 'U862864.bff' saved [7168/7168]
2015-03-10 11:12:13 (38.8 MB/s) - 'U862865.bff' saved [6144/6144]
2015-03-10 11:12:13 (41.7 MB/s) - 'U862866.bff' saved [5120/5120]
2015-03-10 11:12:13 (43.4 MB/s) - 'U862867.bff' saved [6144/6144]
2015-03-10 11:12:14 (42.7 MB/s) - 'U862868.bff' saved [7168/7168]
2015-03-10 11:12:14 (44.8 MB/s) - 'U862869.bff' saved [5120/5120]
2015-03-10 11:12:14 (28.2 MB/s) - 'U862870.bff' saved [13312/13312]
$ grep saved out|tail -10|sed s/$/\ extra/|awk -F"[\[|\/|[highlight #AD7FA8]\][/highlight]]" '{print $NF}'
2015-03-10 11:12:12 (846 KB/s) - 'U862861.bff' saved [345088/345088] extra
2015-03-10 11:12:13 (39.9 MB/s) - 'U862862.bff' saved [6144/6144] extra
2015-03-10 11:12:13 (58.3 MB/s) - 'U862863.bff' saved [8192/8192] extra
2015-03-10 11:12:13 (49.2 MB/s) - 'U862864.bff' saved [7168/7168] extra
2015-03-10 11:12:13 (38.8 MB/s) - 'U862865.bff' saved [6144/6144] extra
2015-03-10 11:12:13 (41.7 MB/s) - 'U862866.bff' saved [5120/5120] extra
2015-03-10 11:12:13 (43.4 MB/s) - 'U862867.bff' saved [6144/6144] extra
2015-03-10 11:12:14 (42.7 MB/s) - 'U862868.bff' saved [7168/7168] extra
2015-03-10 11:12:14 (44.8 MB/s) - 'U862869.bff' saved [5120/5120] extra
2015-03-10 11:12:14 (28.2 MB/s) - 'U862870.bff' saved [13312/13312] extra
$ grep saved out|tail -10|awk -F"[\[|\/]" '{print $(NF-1),$NF}'|awk -F"]" '{print $1}'
345088 345088
6144 6144
8192 8192
7168 7168
6144 6144
5120 5120
6144 6144
7168 7168
5120 5120
13312 13312