I am building a script that should work in csh
, bash
, and fish
with no change:
This does the right thing in all the shells,
perl -e '$bash=shift;$csh=shift;for(@ARGV){unlink;rmdir;}if($bash=~s/h//){exit$bash;}exit$csh;' "$?h" "$status" $PARALLEL_TMP
except that fish
complains:
fish: $? is not the exit status. In fish, please use $status.
Is there a compatible way I can tell fish: Please do not warn, I know what I am doing.