Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: (mime attachment!) debug function: first time weird behavior
- X-seq: zsh-users 1346
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxx>
- To: Timothy J Luoma <luomat+Lists/Zsh/users@xxxxxxxxxxxxxxx>, zsh-users@xxxxxxxxxxxxxxx
- Subject: Re: (mime attachment!) debug function: first time weird behavior
- Date: Fri, 27 Feb 1998 13:52:45 -0800
- In-reply-to: <199802272058.PAA00696@xxxxxxxxxxxxxxx>
- References: <199802272058.PAA00696@xxxxxxxxxxxxxxx>
- Reply-to: schaefer@xxxxxxx
On Feb 27, 3:58pm, Timothy J Luoma wrote:
> Subject: (mime attachment!) debug function: first time weird behavior
>
> The first time it is run it says:
>
> /usr/local/lib/whois/ is a directory
> whois: Have info archived: /usr/local/lib/whois/
>
> If I run it again, it works fine.
>
> I am totally clueless
Er, yes. :-)
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?
DIR=/usr/local/lib/whois
LOOKFOR=`echo $* | awk '{print $NF}'`
FILE=$DIR/$LOOKFOR
Also, you could use
LOOKFOR=$*[$#]
instead of that horrible awk.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author