I would like to combine the outputs of sprio and squeue so that I can see JobId, Name, Priority, Age, State and Time in a one-liner without the use of files. I thought I could do this using awk, paste and some piping, but I don't know enough bash syntax to do anything other than getting the outputs to print consecutively.
{ sprio -u manninm; squeue -u $USER; } | paste
I would like to get certain columns of each output to print side by side, rather but I can only get the two outputs to print consecutively. If someone could point me to some resources or provide some suggestions, thanks.
JOBID PARTITION USER PRIORITY AGE FAIRSHARE JOBSIZE PARTITION TRES
284926 standard $USER 196140 117 95896 128 100000
JOBID PARTITION NAME USER ACCOUNT ST TIME NODES NODELIST(REASON)
284938 standard SM.fastq manninm kretzler PD 0:00 1 (Priority)
Edit: So after reading a little of the awk Tutorial, what I am actually wanting to print to the screen is fields 1-9 of the squeue command, and fields 1 and 4 of the sprio command.
{ squeue -u manninm; sprior -u $USER; } |
creates two records, and I would like fields 1:9 of record 1 and fields 1 and 4 of record two to print column wise to the screen. It doesn't seem to be as easy as I had hoped.