Logon script generation problem
Kevin Myer
kevin_myer at elanco.k12.pa.us
Tue Oct 19 14:34:17 GMT 1999
On Wed, 20 Oct 1999, Kevin Myer wrote:
> Please disregard my earlier message. As is usually the case, I found the
> answer shortly after I sent my earlier message. Apologies for cluttering
> the list.
>
> Kevin
I should have included the solution, as a number of you have asked for
that. Kudos to Juergen Bock <jrb at fluent.de> for emailing me the proper
choice just about the same time I discovered page 85 of "Learning Perl"
from O'Reilly.
Juergen's solution was to use the =~ operator to do regexp matching on the
$ARGV[0] variable, something like:
if ($ARGV[0] =~ /patron/i)
{blah}
The "i" at the end matches all cases (like grep -i does in UNIX). In the
interest of keeping things a bit cleaner, I did an all lower case
translation at the very beginning of my script so that I don't end up with
scripts like "CirCuLatioN.bat".
Thanks for the response Juergen and I think there must be some law
somewhere that says "9 times out of 10, a few seconds after you post a
question to a listserv, you will find the answer in a book or online
somewhere."
Kevin
--
~ Kevin M. Myer
. . Network/System Administrator
/V\ ELANCO School District
// \
/( )\
^`~'^
More information about the samba-ntdom
mailing list