Okay, I'm replying to my own post because I've thought of one way to do this... but it's still not 100% satisfactory for what we need right now... So I want to eliminate it from the discussion before it's suggested.
One thing I could do is make alias links for the program:
$ ln -s actual-script.pl mail-version $ ln -s actual-script.pl cgi-version etc.
and then just check $0. But that's still not very portable (perhaps portability for a script like this is too much to ask ;-)
In reply to Re: How was my script ran?
by criswell
in thread How was my script ran?
by criswell
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |