I use squeue
to display jobs like below
and I would like to count the number of running jobs (according to the fifth) column. The command
squeue -h -u $USER | awk '{print $5}' | grep R | wc -l
does the job nicely so I put it into alias in ~/.cshrc
file as
alias rj "squeue -h -u $USER | awk '{print $5}' | grep R | wc -l"
However, the alias never shows me the correct number. For example
could you please help me on this? Thanks in advance!