Great Circle Associates Majordomo-Users
(May 1998)
 

Indexed By Date: [Previous] [Next] Indexed By Thread: [Previous] [Next]

Subject: Re: master password
From: Jason L Tibbitts III <tibbs @ hpc . uh . edu>
Date: 27 May 1998 21:43:36 -0500
To: Christopher Adams <chris @ sparkie . osl . state . or . us>
Cc: majordomo-users @ GreatCircle . COM
In-reply-to: Christopher Adams's message of "Wed, 27 May 1998 17:07:35 -0700 (PDT)"
References: <Pine.SUN.3.91.980527170620.560A-100000@sparkie.osl.state.or.us>

>>>>> "CA" == Christopher Adams <chris@sparkie.osl.state.or.us> writes:

CA>     # for L in `/bin/ls -1 | grep -v '\.'`; do
CA>     > rm -f $L.passwd
CA>     > ln MASTER.PASSWD $L.passwd
CA>     > done

CA> What is 'do'

Part of the shell looping construct:

  for VARIABLE in LIST; do COMMANDS; done

Look at the manual page for 'sh' or consult a basic UNIX book for more
info.

CA> What is '\.' (a regular expression?)

Yes, one matching any string containing a single period.

CA> So, could someone explain line-by-line what this is doing?

  for L in `/bin/ls -1 | grep -v '\.'`; do

Loop over all files with names not containing dots.  In other words, the
names of all of the lists.  (All files without dots in the list directory
are by definition the names of lists.  List names absolutely cannot contain
periods.)  Each time through the loop, store the name in $L.

  rm -f $L.passwd

Delete $L.passwd if it exists; don't complain if it doesn't.

  ln MASTER.PASSWD $L.passwd

Link $L.passwd to MASTER.PASSWD.

  done

End of the loop.

CA> I realize that the idea is to link list.passwd files to
CA> MASTER.PASSWD. I am just a little hazy about the syntax and some of the
CA> characters.

I really recommend getting a book like _Unix in a Nutshell_ or any of
the other basic Unix books from O'Reilly (www.ora.com).  This really isn't
the place to discuss these things.

 - J<


Follow-Ups:
References:
Indexed By Date Previous: Re: Wisguys And "listname-outgoing"
From: Kynn Bartlett <kynn-mlists@idyllmtn.com>
Next: Re: FINDMAIL.COM
From: Chuq Von Rospach <chuqui@plaidworks.com>
Indexed By Thread Previous: master password
From: Christopher Adams <chris@sparkie.osl.state.or.us>
Next: Re: master password
From: Christopher Adams <chris@sparkie.osl.state.or.us>

Google
 
Search Internet Search www.greatcircle.com