Unix Shell - Not A Valid Identified

This is Interesting: Free IT Magazines  
Home > Archive > Unix Shell > September 2007 > Not A Valid Identified





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Not A Valid Identified
cmschube@gmail.com

2007-09-25, 7:20 pm

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

Icarus Sparry

2007-09-25, 7:20 pm

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.

cmschube@gmail.com

2007-09-26, 1:26 pm

On Sep 25, 5:00 pm, Icarus Sparry <use...@icarus.freeuk.com> wrote:
> On Tue, 25 Sep 2007 14:13:42 -0700, cmschube wrote:
>
>
>
>
>
>
>
> 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

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com