Watch with Process Substitution
问题 I often run the command squeue -u $USER | tee >(wc -l) where squeue is a Slurm command to see how many jobs you are running. This gives me both the output from squeue and automatically tells how many lines are in it. How can I watch this command? watch -n.1 "squeue -u $USER | tee >(wc -l)" results in Every 0.1s: squeue -u randoms | tee >(wc -l) Wed May 9 14:46:36 2018 sh: -c: line 0: syntax error near unexpected token `(' sh: -c: line 0: `squeue -u randoms | tee >(wc -l)' 回答1: From the watch