bug-bash
[Top][All Lists]
Advanced

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

Modifying $0?


From: Davy Durham
Subject: Modifying $0?
Date: Wed, 07 Jul 2004 14:51:48 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040115

Hi,
I apologize if this is the wrong list to ask, but it's the only list referenced on http://cnswww.cns.cwru.edu/~chet/bash/bashtop.html

I wanted to know if it's at all possible to change the value of $0. I'm executing bash where the first argument is the file I want it to read commands from. But this is a temp filename and $0 contains this ugly temp filename rather than something better (I'd rather it contain the filename I created the temp file from) These scripts are also sensitive about what file-descriptors are opened and are interactive, so I can't pipe the commands in via stdin reliably.

I looked thru the manual to see if perhaps there was a different way of having $0 initially set to something besides this first argument, but since I'm not using the -c flag I can't. And I tried combining using the first arg filename feature and -c .. but that didn't work either.

Thanks in advance,
 Davy





reply via email to

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