Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: (mime attachment!) debug function: first time weird behavior



	Author:        "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxx>
	Original-Date: Fri, 27 Feb 1998 13:52:45 -0800
	Message-ID:    <980227135245.ZM22520@xxxxxxxxxxxxxxxxxxxxxxx>

> DIR=/usr/local/lib/whois
> FILE=$DIR/$LOOKFOR
> LOOKFOR=`echo $* | awk '{print $NF}'`
>
> Have you considered that perhaps you should assign a value to LOOKFORE
> -before- you use it to assign to another variable?


*beats self upside the head*

All I can claim as an excuse is that I've been up until about 6 or 7 all  
week working on a report


> Also, you could use
>
> 	LOOKFOR=$*[$#]
>
> instead of that horrible awk.

Oh!  Nifty!  Will do....

I still use /bin/sh for most scripting things so I haven't learned much of  
the zsh-isms.....

TjL


-- 
"It takes real courage to be a Macintosh user; it takes real
conviction; not unlike being a Christian in the days of the Romans." 
 - Guy Kawasaki, Chief Evangelist for Apple Computer - from "Hotseat"
   interview with John McChesney (3/28/97) [ my birthday! ]



Messages sorted by: Reverse Date, Date, Thread, Author