Re: /bin/sh Can one Easily Strip Path Name from $0?

2007-11-14 Thread Erik Trulsson
On Wed, Nov 14, 2007 at 09:08:57AM -0600, Martin McCormick wrote: I am ashamed to admit that I have been writing shell scripts for about 15 years but this problem has me stumped. $0 is the shell variable which contains the script name or at least what name is linked to the script. The

Re: /bin/sh Can one Easily Strip Path Name from $0?

2007-11-14 Thread Bill Moran
In response to Martin McCormick [EMAIL PROTECTED]: I am ashamed to admit that I have been writing shell scripts for about 15 years but this problem has me stumped. $0 is the shell variable which contains the script name or at least what name is linked to the script. The string in $0 may

Re: /bin/sh Can one Easily Strip Path Name from $0?

2007-11-14 Thread Vince
Martin McCormick wrote: I am ashamed to admit that I have been writing shell scripts for about 15 years but this problem has me stumped. $0 is the shell variable which contains the script name or at least what name is linked to the script. The string in $0 may or may not contain a path,

Re: /bin/sh Can one Easily Strip Path Name from $0?

2007-11-14 Thread Martin McCormick
The basename utility does the trick. Thanks to all of you who answered. Martin ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]

Re: /bin/sh Can one Easily Strip Path Name from $0?

2007-11-14 Thread Michaël Grünewald
Martin McCormick [EMAIL PROTECTED] writes: I am ashamed to admit that I have been writing shell scripts for about 15 years but this problem has me stumped. $0 is the shell variable which contains the script name or at least what name is linked to the script. The string in $0 may or may