for selecting the second column, PID, from `ps aux`,
ps aux | awk '{print $2}'
ps aux | jq -Rr 'split(" ")[1]'
ps aux | jq -Rr 'split("\\s+"; null)[1]'
for selecting the second column, PID, from `ps aux`,
works for me, as gawk's default $FS field separator treats runs of whitespaces as a single separation of fields ( https://www.gnu.org/software/gawk/manual/html_node/Field-Spl... ), quite similar to "standard" Open Group/POSIX awk ( https://pubs.opengroup.org/onlinepubs/9799919799/utilities/a... ). on the other hand doesn't work here due to `ps aux` adding a variable number of spaces for formatting. seems to work though.