Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: how to search for a substring in a parameter?
- X-seq: zsh-users 5699
- From: Carlos Carvalho <carlos@xxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: how to search for a substring in a parameter?
- Date: Mon, 13 Jan 2003 19:48:11 -0200
- In-reply-to: <8728.1042482778@xxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <15907.432.363150.443412@xxxxxxxxxxxxxx> <8728.1042482778@xxxxxxx>
Sorry for making noise with such an easy question... I even found the
answer myself some time later but you were too fast in answering for
me to tell it. Anyway I now understand the meaning of M, thanks.
Fascinated by that part of the man page I tried the following:
% max=8
% bar=5
% if [[ $bar == <1-$max> ]] {print in } else {print out}
zsh: parse error: condition expected: $bar
It works if I change $max by 8. Is it illegal to have parameters
inside <-> or I'm doing it wrong? The man page is a little ambiguous.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author