how to print ps header when using pipe in linux
this normal ps output
$ ps -ef
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 17:00 ? 00:00:02 /usr/lib/systemd/systemd
but below ps command output without header
$ ps -ef | grep systemd
root 1 0 0 17:00 ? 00:00:02 /usr/lib/systemd/systemd
how do i print ps header for second command?
thx
Aucun commentaire:
Enregistrer un commentaire