I want to get the head as in my output.
ps lax |head -n 1
F UID PID PPID PRI NI VSZ RSS WCHAN STAT TTY TIME COMMAND
And the filtered line:
ps lax |grep openbox |grep -v grep
0 1000 1608 1513 20 0 206408 20580 SyS_po S ? 0:00 openbox --config-file /home/debian9/.config/openbox/lxde-rc.xml
What i expect to get is as below two lines:
F UID PID PPID PRI NI VSZ RSS WCHAN STAT TTY TIME COMMAND
0 1000 1608 1513 20 0 206408 20580 SyS_po S ? 0:00 openbox --config-file /home/debian9/.config/openbox/lxde-rc.xml
How to get the two lines(head+filtered content) as output with a simple command?