Hylafax Mailing List Archives
|
[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
Re: [hylafax-users] small patch for hylafax-4.1beta2.tar.gz
On Fri, 21-Jul-2000 at 01:30:53 -0600, Lee Howard wrote:
> I understand this change to be appropriate, as I've been corrected about
> identical issues in my own bash scripts, but could somebody please
> enlighten me as to exactly what the difference is between an assignment
> '$TEST=phrase' and 'TEST=phrase'
When doing 'TEST=phrase' you assign the word phrase to the env
variable TEST. You can later do 'echo $TEST' to retrieve the
contents of TEST.
When doing '$TEST=phrase' the shell first retrieves the contents
of TEST. So if you do
TEST=blah
$TEST=phrase
the second line becomes blah=phrase. So the shell would like
to execute the command 'blah=phrase' which normally isn't available :-)
(In my case TEST was set to 1 so the result was 1=0)
Try the following (you might want to adjust the path):
sh
cd /tmp
PATH=$PATH:/tmp
ln -s /bin/hostname blah=phrase
You know should have a symlink /tmp/blah=phrase linked to /bin/hostname.
Now do:
TEST=blah
$TEST=phrase
If hostname resides in /bin on your system you should see your machine
name since blah=phrase gets executed.
-Andre
____________________ HylaFAX(tm) Users Mailing List _______________________
To unsub: mail -s unsubscribe hylafax-users-request@hylafax.org < /dev/null