This is probably the closest to what you're trying to do without getting
too fancy:

declare -a cooked_list=$(ls /clamscan/servers/)

for server in [EMAIL PROTECTED]; do
  if [ "$server" == "$target_system" ]; then
    parm_1="valid"
    break
  else
    parm_1="invalid"
  fi
done


-----Original Message-----
From: Linux on 390 Port [mailto:[EMAIL PROTECTED] On Behalf Of
James Melin
Sent: Thursday, September 06, 2007 5:10 PM
To: [email protected]
Subject: Re: I am missing something basic with bash scripting.

I'll try that however my echo's are not revealing that to be the case.
Stay tuned.




             Mark Post <[EMAIL PROTECTED]>
             Sent by: Linux on 390 Port
             <[email protected]>
To
 
[email protected]
 
cc
             09/06/2007 04:07 PM
 
Subject
                                                                     Re:
I am missing something basic with bash scripting.
                            Please respond to
               Linux on 390 Port <[email protected]>








>>> On Thu, Sep 6, 2007 at  4:53 PM, in message
<[EMAIL PROTECTED]
n.us>,
James Melin <[EMAIL PROTECTED]> wrote:
-snip-
> raw_list=`ls /clamscan/servers`     #read list of mountpoints
-snip-
> But even though the display of 'cooked_list' seems to be what I want
it to
> be, this never returns a match.

> Anyone see where I missed the turnip truck on this?

I'm guessing that if you subsitute /bin/ls instead of just "ls" (and
change the whole thing to $(/bin/ls /clamscan/servers) to satisfy Adam)
that
thing will work better.  I think you're likely getting trailing "/"es on
the end of the names, but that's not how you're passing in
target_system.


Mark Post

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or
visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or
visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

Reply via email to