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

Re: FW: Help! ipmasqadm problem - Help its still not working



If unquoted, most shells will search for a file with that name before
giving up and using the parameter as a string.

echo "0" > ./1

cat 1 > /proc/stuff

Not quoting the one will result in the file 1 being copied to /proc/stuff,
and file 1 contains a zero, resulting in the exact opposite of what was
intended.

Admittedly a weird failure mode, but then again its not a good idea to make
a script depend upon the user not making wierd file names in the same
directory.

----- Forwarded by Vince Mulhollon/Brookfield/Norlight on 02/14/2001 09:06
AM -----
                                                                                                                    
                    Robert                                                                                          
                    Guthrie              To:     "Brian Kimsey-Hickman" <kimhick@mpinet.net>, "Debian Firewall      
                    <rguthrie@pob        List" <debian-firewall@lists.debian.org>, "Adam Lydick"                    
                    ox.com>              <awlydick@bulldog.unca.edu>                                                
                                         cc:     (bcc: Vince Mulhollon/Brookfield/Norlight)                         
                    02/14/2001           Fax to:                                                                    
                    08:56 AM             Subject:     Re: FW: Help! ipmasqadm problem - Help its still not working  
                                                                                                                    
                                                                                                                    




On Wednesday 14 February 2001 08:12, Brian Kimsey-Hickman wrote:
> Well, you are the second person to ask this and it is not stupid at all.
> Its just the type of thing I would forget to do.  However, in this case I
> did remember.  Any idea why some sources have the 1 in quotation marks?
>
> Thanks,
>
> Brian
Well, while I can't help much with the main problem, I can possibly answer
the quotation mark question to some degree of certainty.

Answer:
In this instance, it doesn't matter which way you do it.  Both are correct.


Brief explanation:

echo "1;"
1;

echo 1;
1

The quotes make some things act differently, so habits form.


--
Did you know that if you play a Windows 2000 cd backwards, you
will hear the voice of Satan?

That's nothing!  If you play it forward, it'll install Windows 2000.


--
To UNSUBSCRIBE, email to debian-firewall-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact
listmaster@lists.debian.org





Reply to: