On Thursday 06 September 2007 17:56, Eric Chevalier wrote:
>On 9/6/2007 4:31 PM, Edmund R. MacKenty wrote:
>> Note that I'm using $(...) instead of backticks.  Backticks are evil!
>
>The InList() function is slick; I like it!
>
>But I'm curious: why are backticks evil? (I didn't know about the
>"$(command)" trick; I've been using backticks for a long time. I learn
>something new every day!)

I used to use backticks all the time too, but I never much liked them because
they are so easy to confuse with single-quotes, and on some proportional
fonts they are very hard to see, even.  When I found that even the Bourne
shells on UNIX systems all support $(...) for command substitutions, I
switched for good.

BTW: the best solution posted so far is Lary Ploetz's:

[[ -f /clamscan/servers/$target_system ]] && parm_1="valid"

which avoids the entire "is this value in this list" problem completely.  Very
nice!

I would, however, use -e instead of -f, because the system name is probably a
directory, not a plain file.
        - MacK.
-----
Edmund R. MacKenty
Software Architect
Rocket Software, Inc.
Newton, MA USA

----------------------------------------------------------------------
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