I often run programs in parallel via the shell.
generate_some_info (){
if [ $i -eq 4 ]; then echo "Here is some useful info." ; fi
if [ $i -eq 7 ]; then ls --errorx; fi
}
for i in {1..10}; do
generate_some_info&
done
Program output I'm trying to track is hard to see because the server notifies me every time a job starts or stops.
[2] 2052
[3] 2053
[2] - done generate_some_info
[2] 2054
[3] - done generate_some_info
[3] 2055
Here is some useful info.
[4] 2057
[3] - done generate_some_info
[3] 2058
[4] - done generate_some_info
ls: unrecognized option '--errorx'
[4] 2059
[3] - done generate_some_info
[4] + done generate_some_info
Try 'ls --help' for more information.
[3] 2060
[2] - exit 2 generate_some_info
[2] 2061
[3] - done generate_some_info
[3] 2062
[2] - done generate_some_info
[3] + done generate_some_info
Is there a way to get a shell such as zsh or bash to not bury output in job notifications?
0 Answers