Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Check existence of an element of an array (a FAQ?)
- X-seq: zsh-users 12885
- From: Helmut Jarausch <jarausch@xxxxxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Check existence of an element of an array (a FAQ?)
- Date: Fri, 30 May 2008 10:40:30 +0200 (CEST)
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Reply-to: jarausch@xxxxxxxxxxxxxxxxxxx
Hi,
please help me with the following:
Is there an elegant way (i.e. without a loop) to
get the following action
Special_Users=('you','me',......)
U='nobody'
if $U in $Special_Users
# do something
fi
Many thanks for a hint
Helmut Jarausch
Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany
Messages sorted by:
Reverse Date,
Date,
Thread,
Author