This is my first time posting to this list, so, apologies if this question has already been asked or answered before.
Because (sadly) most people using UNIX-like operating systems do not have fish installed, it is generally a bad idea to write scripts in fish for everyone to use, because fish (luckily) deviates from the Bourne shell syntax in some ways. Therefore, if I distribute a script written in fish, I want to be able to include a header at the top so I can check if fish is executing the shell. If not, either run the bourne shell version, or print an error message. If fish IS running the script, just continue. It would look something like this, in pseudocode. if fish is in $PATH fish $THIS_FILE end if $FISH_VERSION is zero length echo "You need to download fish." echo "Go to http://www.fishshell.com." exit 1 end ... rest of fish script here ... exit 0 The reason that I want to do this is because most people will just get rid of my program if they don't know what to do with it. Unfortunately, most people have not even /heard/ of fish. -- Daniel Roskams (rocketpenguin) <rocket.peng...@riseup.net> ------------------------------------------------------------------------------ _______________________________________________ Fish-users mailing list Fish-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fish-users