« first day (4452 days earlier)      last day (506 days later) » 

1:07 PM
 
 
4 hours later…
5:08 PM
Anybody good with awk - @terdon perhaps? Anyone know an easy way to convert standard space separated output to CSV (comma or semicolon delimited) to process in Excel? Thanks 🙏
On a normal ps aux output for example ..
 
5:36 PM
@ArturMeinild Define "standard". Can you be 100% sure none of the fields have internal spaces? Things like this:
field1 field2 "field3a field3b" field4
If it's ps aux, you cannot be sure of that.
Anyway, for a first pass approach, you could try this:
ps aux | perl -lane 'print join("\t",@F[0..9],@F[10..$#F])' > aa.tsv
That makes the first 8 fields tab separated, and then leaves the command part that is likely to have internal spaces unchanged.
ah no, no it doesn't. On sec
Here you go:
ps aux | perl -ane 'print join("\t",@F[0..9]); print "\t@F[10..$#F]\n"' > aa.tsv
 
5:58 PM
@terdon Thanks, I'll try. 😎 Also, for this it's not that important with a few out of line spaces, but I'll see if it fits my need. Cheers. 👍
 
good luck!
 

« first day (4452 days earlier)      last day (506 days later) »