Re: Script treats variable as command

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

 



Space characters!

I thought I would do
IFACE       = "eth0"
CLASS_A = "10......"

for readability.

Results in IFACE thinking it is a command.

Thanks

Larry Nobs

----- Original Message -----
From: "Ed Greshko" <Ed.Greshko@xxxxxxxxxxx>
To: <Redhat-list@xxxxxxxxxx>
Sent: Friday, October 17, 2003 10:22 PM
Subject: Re: Script treats variable as command


> On Sat, 2003-10-18 at 10:56, lrnobs wrote:
> > I found a script for setting iptables on the internet that I like so
far.
> >
> > The author declares some variables and then uses them later on in the
script
> > ie IFACE="eth0"
> >
> > When I try to run the script with ./iptables.rules   I get a message
that
> > IFACE is not a command.  I tried $IFACE with the same result.
> >
> > Please tell me what I am missing here.
>
> Sounds like your default shell is something like csh or tcsh.
>
> You should make sure the first line of your script is something like...
>
> #!/bin/sh
>
> --
> "An opinion is like an asshole - everybody has one."
>     - Clint Eastwood as Harry Callahan, The Dead Pool - 1988.
>
>
> --
> redhat-list mailing list
> unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/redhat-list
>
>



-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux