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 5704
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: how to search for a substring in a parameter?
- Date: Tue, 14 Jan 2003 05:16:57 +0000
- In-reply-to: <15907.13339.279982.418887@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <15907.432.363150.443412@xxxxxxxxxxxxxx> <8728.1042482778@xxxxxxx> <15907.13339.279982.418887@xxxxxxxxxxxxxx>
On Jan 13, 7:48pm, Carlos Carvalho wrote:
}
} % if [[ $bar == <1-$max> ]] {print in } else {print out}
} zsh: parse error: condition expected: $bar
}
} Is it illegal to have parameters inside <-> ...?
Yes. Do it this way:
range='<1-8>'
if [[ $bar == ${~range} ]] {print in} else {print out}
Messages sorted by:
Reverse Date,
Date,
Thread,
Author