my fault about pattern matching in ksh

my fault about pattern matching in ksh

Post by Hao Wa » Sat, 27 Feb 1993 05:35:11

I posted a question about ksh pattern matching stuff early today.  
Actually, I am not use it right. Sorry for the mistake. Thanks to Jim  

Hao Wang


1. ksh pattern matching when pattern is in a variable

Witness this:

  [[ work = $exclude ]] && print excluded

The print is executed on AIX 433, but not on AIX 5.1 or SunOS 5.9.

Looking at the original AT&T ksh book by David Korn, on pg 156 under
Conditional Commands, in the [[ ... ]] section, it says

"ksh expands the operands(s) for each conditional expression primitive
for command substitution, parameter expansion, and quote removal as
required to evaluate the command."

To me, this means it should be expanding $exclude before it interprets
it as a pattern.  And this is certainaly The Right Thing To Do.  What
am I missing?


2. URGENT help needed with aha1522b

3. Pattern matching and extracting the data which matches the pattern

4. Any good graphics software for Linux?

5. ksh - checking for filenames matching a pattern

6. how to set multi-itimer in a process?

7. KSH Pattern Match Deletions

8. first day as unix admin

9. ksh pattern matching

10. ksh conditional (string match pattern)

11. ksh discrepancy on pattern matching

12. ksh and pattern matching

13. How can I pattern-match in ksh?