Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [[ str == pat ]] ?
- X-seq: zsh-workers 453
- From: Glenn Barry <glenn@xxxxxxxxxxxxxxxx>
- To: Zoltan Hidvegi <hzoli@xxxxxxxxxx>
- Subject: Re: [[ str == pat ]] ?
- Date: Thu, 12 Oct 1995 16:36:35 -0400
- Cc: glenn@xxxxxxxxxxxxxxxx, zsh-workers@xxxxxxxxxxxxxxx (zsh-workers), "Arnold D. Robbins" <arnold@xxxxxxxxxxxxxxxx>
- In-reply-to: Zoltan Hidvegi's message of "Thu, October 12, 1995 13:07:41 +0100" regarding "Re: [[ str == pat ]] ?" id <199510121207.NAA13791@xxxxxxxxxxxxxxxxx>
- Organization: Emory University, Dept of Math and CS
- References: <199510120542.BAA08305@xxxxxxxxxxxxxxxxxxxxxxx> <199510121207.NAA13791@xxxxxxxxxxxxxxxxx>
- Reply-to: glenn@xxxxxxxxxxxxxxxx (Glenn Barry)
Zoltan> Glenn Barry wrote:
>> most excellant zsh workers,
>>
>> According to the "Korn Shell Ref" card (updated for ksh93) from
>> SSC
>>
>> [[ str == pat ]]
>>
>> is preferred and
>>
>> [[ str = pat ]]
>>
>> is "obsolete" (but still works of course).
>>
>> Can the == for [[ be added to zsh? We've got some code that needs
>> to work on both ksh and zsh so it would be nice...
Zoltan> My ksh manual from Solaris 5.4 (Last change: 3 Aug 1993) does
Zoltan> not mention this, but I tried the ksh here, and it accepted
Zoltan> the == syntax. Here is a patch to zsh to do that. This
Zoltan> makes [[ ... = ... ]] and [[ ... == ... ]] equivalent.
Zoltan> Could you post your ksh documentation?
Sure, it's the "KORN SHELL REFERENCE" card by arnold robbins for
Specialized Systems Consultants, Inc (Seattle, WA, USA) at
sales@xxxxxxxx It describes both ksh88 and ksh93. It's color coded
so the ksh93 stuff is in blue ... nicely done, btw. Zsh could use one
of these ... richard, if you want to do one of these for zsh then
contact arnold (arnold@xxxxxxxxxxxxxxxx) and/or SSC at the above
address. (i have no biz interest in this, btw)
The card says
string = pattern
true if string matches pattern
quote any part of pattern to treat
it as a string; *obsolete in ksh93*
*string == pattern*
*same as = (preferrred in ksh93)*
(coded *blue* for ksh93)
Arnold consulted with dave korn on the ref card so i bet it's correct
:).
Note the ksh with solaris 2.4 is ksh88i but if you have cde, then
dtksh is ksh93 w/motif extensions.
glenn
Messages sorted by:
Reverse Date,
Date,
Thread,
Author