I am having an array in linux shell script. Array contains list of commands in bash shell script. For instance :
args =( "ls","mv /abc/file1 /xyz/file2","hive -e 'select * from something'" )
Now I am executing these commands in array using GNU parallel as bellow
parallel ::: "${args[@]}"
I want to check the status code of individual process when they finish. I am aware that $?
will give me the number of process which have failed but I want to know the exit code of individual process. How can I catch the exit codes of individual processes executed in GNU parallel?