When I run pgrep vim | xargs ps
, it prints
PID TT STAT TIME COMMAND
91234 s001 S+ 0:03.14 vi user.py
93868 s005 S+ 0:01.55 vi video.py
Yet when I run
pgrep vim | xargs ps -o command
it prints
COMMAND
-bash
tmux -2
-bash
vi user.py
-bash
-bash
vi video.py
(pgrep)
xargs ps -o command
-bash
-bash
-bash
-bash
-bash
sqlite3 spot.db
-bash
-bash
python app.py
/usr/bin/python app.py
-bash
/usr/bin/man lsof
sh -c (cd '/usr/share/man' && (echo ".ll 9.8i"; echo ".nr LL 9.8i"; /bin/cat '/usr/share/man/man8/lsof.8') | /usr/bin/tbl | /usr/bin/groff -Wall -mtty-char -Tascii -mandoc -c | (/usr/bin/less -is || true))
sh -c (cd '/usr/share/man' && (echo ".ll 9.8i"; echo ".nr LL 9.8i"; /bin/cat '/usr/share/man/man8/lsof.8') | /usr/bin/tbl | /usr/bin/groff -Wall -mtty-char -Tascii -mandoc -c | (/usr/bin/less -is || true))
/usr/bin/groff -Wall -mtty-char -Tascii -mandoc -c
sh -c (cd '/usr/share/man' && (echo ".ll 9.8i"; echo ".nr LL 9.8i"; /bin/cat '/usr/share/man/man8/lsof.8') | /usr/bin/tbl | /usr/bin/groff -Wall -mtty-char -Tascii -mandoc -c | (/usr/bin/less -is || true))
/usr/bin/less -is
grotty
How can I print only
user.py
video.py