I am trying to pipe the output of ps -ax -o pid,lstart
into an awk
and work with that or try to sort by a certain column using sort
.
The output of ps -ax -o pid,lstart
is something like:
PID STARTED
1 Tue Feb 4 23:10:00 2020
2 Tue Feb 4 23:10:00 2020
3 Tue Feb 4 23:10:00 2020
4 Tue Feb 4 23:10:00 2020
6 Tue Feb 4 23:10:00 2020
8 Tue Feb 4 23:10:00 2020
9 Tue Feb 4 23:10:00 2020
10 Tue Feb 4 23:10:00 2020
11 Tue Feb 4 23:10:00 2020
12 Tue Feb 4 23:10:00 2020
14 Tue Feb 4 23:10:00 2020
15 Tue Feb 4 23:10:00 2020
16 Tue Feb 4 23:10:00 2020
17 Tue Feb 4 23:10:00 2020
18 Tue Feb 4 23:10:00 2020
20 Tue Feb 4 23:10:00 2020
Which makes the job much more difficult because I'd have to sort by day first, then an hour, minute, and second...