Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

case insensitive prompt matching



Greg Rundlett wrote:
> I've seen many tutorials or examples that include expect
> "assword", and note that you don't have to chop off the 'p' to avoid
> problems with case-sensitivity.
> 
> ...I wonder if the prevalence of one
> particular early example has led to this current indelicateness.  Or,
> perhaps -nocase and -re options were added later.

I suspect the technique predates expect. I've seen it used by countless 
terminal, SLIP, PPP, and other login automation scripts. It was probably 
carried over to expect as a "best practice."

In the original case, it makes sense, as the scripting language was 
usually very simple, and it had to deal with a variety of target systems.

In the context of this thread, it makes little sense. It's highly 
improbable that su or passwd would change their prompt capitalization, 
and if they did (or say you tried sing this function on a non-Linux 
system), it's likely all the other prompting would be different too.

  -Tom

-- 
Tom Metro
Venture Logic, Newton, MA, USA
"Enterprise solutions through open source."
Professional Profile: http://tmetro.venturelogic.com/






BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org