Not A Valid Identified

Not A Valid Identified

am 25.09.2007 23:13:42 von cmschube

Hey all,

Forgive me, this is my first shell script, but I can't figure out why
I get the message:

': not a valid identifieread" 'rSnareServerPath'

Here's my code...

echo "What is the IP/Hostname of the Snare Server? If You Don't Know,
Hit Enter"
read rSnareServerPath
if [ -z $rSnareServerPath ]; then
echo "Snare Server Path Not Set"
else
# Append "network=specified hostname" to 10th line of audit.conf
sed -e "10a network=$rSnareServerPath" < /etc/audit/audit.conf > /etc/
audit/audit.conf.old
mv /etc/audit/audit.conf.old /etc/audit/audit.conf
fi

Thanks in advance

cmschube

Re: Not A Valid Identified

am 26.09.2007 00:00:31 von Icarus Sparry

On Tue, 25 Sep 2007 14:13:42 -0700, cmschube wrote:

> Hey all,
>
> Forgive me, this is my first shell script, but I can't figure out why I
> get the message:
>
> ': not a valid identifieread" 'rSnareServerPath'
>
> Here's my code...
>
> echo "What is the IP/Hostname of the Snare Server? If You Don't Know,
> Hit Enter"
> read rSnareServerPath
> if [ -z $rSnareServerPath ]; then
> echo "Snare Server Path Not Set"
> else
> # Append "network=specified hostname" to 10th line of audit.conf sed -e
> "10a network=$rSnareServerPath" < /etc/audit/audit.conf > /etc/
> audit/audit.conf.old
> mv /etc/audit/audit.conf.old /etc/audit/audit.conf fi
>
> Thanks in advance
>
> cmschube

Perhaps you edited the file using an editor that puts CR LF on the end of
lines (DOS style), rather than just LF.

Re: Not A Valid Identified

am 26.09.2007 17:52:02 von cmschube

On Sep 25, 5:00 pm, Icarus Sparry wrote:
> On Tue, 25 Sep 2007 14:13:42 -0700, cmschube wrote:
> > Hey all,
>
> > Forgive me, this is my first shell script, but I can't figure out why I
> > get the message:
>
> > ': not a valid identifieread" 'rSnareServerPath'
>
> > Here's my code...
>
> > echo "What is the IP/Hostname of the Snare Server? If You Don't Know,
> > Hit Enter"
> > read rSnareServerPath
> > if [ -z $rSnareServerPath ]; then
> > echo "Snare Server Path Not Set"
> > else
> > # Append "network=specified hostname" to 10th line of audit.conf sed -e
> > "10a network=$rSnareServerPath" < /etc/audit/audit.conf > /etc/
> > audit/audit.conf.old
> > mv /etc/audit/audit.conf.old /etc/audit/audit.conf fi
>
> > Thanks in advance
>
> > cmschube
>
> Perhaps you edited the file using an editor that puts CR LF on the end of
> lines (DOS style), rather than just LF.

Hmmm.. interesting point... I did originally do it in 'vi' then did
some stuff in notepad.. I'll redo it in 'vi' and see what happens..

Thanks for the input,

cmschube