[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Modifying $0?

From: Davy Durham
Subject: Re: Modifying $0?
Date: Thu, 08 Jul 2004 10:48:19 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040115

Paul Jarc wrote:

Try this:
if [ "$0" != what-you-want ]; then
 exec /bin/sh -c '. "$@"' what-you-want "$0" ${1+"$@"}
Interesting.. this appears to work. But I had to remove the shift for $1..$n to be correct (even though I see on the 'ps' list that it looks as though it needs to have the shift). I'm not entirely sure how this is working. I understand the "$@", but does the '-c .' have a special meaning in bash?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]