We have experience problem in checking for banned characters of certain names.  
We narrow it down to the combination of two characters that is causing the 
comparison returns inconsistent result.  Here is the test script

# cat /tmp/t
#!/bin/ksh

typeset bannedChars=']-'

if [[ "$1" = *+([$bannedChars])* ]]
then
  print "Found special char"
else
  print "No    special char found"
fi

# for i in 1 2 3 4 5 6 7 8 9 10; do /tmp/t stringWithpPand0 ; done
No    special char found
No    special char found
Found special char
No    special char found
Found special char
Found special char
No    special char found
No    special char found
No    special char found
No    special char found

This problem is found on RHEL6, RHEL6.1 running on x86_64 with both have the 
same version of ksh.

# ksh -c 'print $KSH_VERSION'
Version JM 93t+ 2010-06-21
# uname -a
Linux c1f2bc3n06 2.6.32-131.0.15.el6.x86_64 #1 SMP Tue May 10 15:42:40 EDT 2011 
x86_64 x86_64 x86_64 GNU/Linux

# ksh -c 'print $KSH_VERSION'
Version JM 93t+ 2010-06-21
# uname -a
Linux c20f2n04 2.6.32-71.el6.x86_64 #1 SMP Wed Sep 1 01:33:01 EDT 2010 x86_64 
x86_64 x86_64 GNU/Linux
_______________________________________________
ast-developers mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-developers

Reply via email to