![]() |
grep all but first line
"ps aux" outputs the following as the first line: USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND how can I preserve this line if I do a "ps aux | grep " so that I can still see the header for each column? In essence, I want to grep all but the first line...
|
The -n +2 means “start passing through on the second line of output”. This is a quick hacky way: ls -lart. grep -v ^total . Basically, remove any lines that start with "total", which in ls output should only be the first line.
|
| All times are GMT -4. The time now is 01:03 PM. |
Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.