grep help
Hello -- I can't seem to find how to do this.
My grep command: grep ms filename outputs:: <snip> 1207169821905 DC 313ms RC:1000 RID:5 PID:405708 TIMES:289 0 1 0 0 3 0 16 2 0 0 2 1207170392173 DC 301ms RC:1000 RID:5 PID:270582 TIMES:265 0 0 1 0 3 0 23 5 0 0 4 1207170405346 DC 378ms RC:2005 RID:5 PID:376912 TIMES:371 0 0 0 0 3 1 3 <snip> Question:: How do I narrow my query so it only shows the ###ms so it outputs:: 313ms 301ms 378ms Thanks in advance |
*I* would do... "grep <etc> | cut -f 3"
|
Hey Thanks for the direction Chris;
I needed to specify my 'delimiter' first. But your suggestion defiantly got me on track. grep ms <file> | cut -d ' ' -f 3 |
Or something like
Code:
grep -o ...ms filename # if exactly three digit numbers before ms |
ahh, i always forget what the default field seperator is...
|
|
All times are GMT -5. The time now is 05:41 AM. |