Hi,
is it possible to return results from a remote server _only if_ they
were created?
Use case: I run a script on remote which will not always create an output.
This is intentional, thus not writing a file is not an error.
However, in that case I would like '--return' to be ignored in order not
to spam my stderr with false positives.
An example:
function fu {
echo "no file produced"
exit 8
}
export -f fu
Currently I get:
parallel --sshloginfile MYMACHINES --env fu --return nonexistentfile
'fu' ::: 1
#>no file produced
#>rsync: link_stat "/home/remoteuser/nonexistentfile" failed: No such
file or directory (2)
#>rsync error: some files/attrs were not transferred (see previous
errors) (code 23) at main.c(1655) [generator=3.1.1]
My wishful thinking:
parallel --sshloginfile MYMACHINES --env fu --return nonexistentfile
--skip-return-status 8 'fu' ::: 1
#>no file produced
Best,
Benjamin