-d ' '
means using a single space as delimiter. Since there’re 1 space before 2049 and 2 spaces before 12290, your command get them by -f 2
and -f 3
.
I recommend using ps aux | awk '{print $2}'
to get those pids.
Or you can use tr
to squeeze those spaces first
ps aux | tr -s ' ' | cut -d ' ' -f 2