1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
#!@awk@ -f
# This a sample command passed to paexec via option -c
{
# Read tasks line-by-line
if ($1 != 0){
# Result which should not contain empty lines
print "1/" $1 "=" 1/$1
# "paexec -g" requires either "success" or "failure" in the end.
# For non-zero input number x we are able to calculate 1/x
print "success"
}else{
# Oops, dependent tasks will fail as well
print "Cannot calculate 1/0"
# "paexec -g" requires either "success" or "failure" in the end.
print "failure"
}
# End of task marker, empty line by default
print ""
# In the end, stdout must be flushed
fflush()
}
|