delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/08/22/09:20:46

From: "Juan Manuel Guerrero" <ST001906 AT HRZ1 DOT HRZ DOT TU-Darmstadt DOT De>
Organization: Darmstadt University of Technology
To: djgpp AT delorie DOT com
Date: Tue, 22 Aug 2000 15:18:07 +0200
MIME-Version: 1.0
Subject: bash regexp question
X-mailer: Pegasus Mail for Windows (v2.54DE)
Message-ID: <D1D61633AF7@HRZ1.hrz.tu-darmstadt.de>
Reply-To: djgpp AT delorie DOT com

Please look at the following code:
case ${PWD-`pwd`} in
/*) 
	echo POSIX;;
?:[/\\]*) 
	echo MS-DOS;;
esac

I would expect that the code prints: MS-DOS.
The fact is that it does nothing.
If I replace the regular expresion: [/\\] by [\\/]
the code works.
Is this a bash bug or some Posix feature completely
unknow to me. I am using stock bash203.

I have found *similar* code in conf.sh. This file is part
of rcs5713s.zip and of course I can not configure the
package due to this "misfeature" or bug in bash.


TIA for any help.
Guerrero, Juan Manuel

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019