delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/08/18/18:11:35

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Date: 18 Aug 2000 15:10:19 -0700
Message-ID: <20000818221019.854.cpmta@c012.sfo.cp.net>
X-Sent: 18 Aug 2000 22:10:19 GMT
Mime-Version: 1.0
To: cygwin AT sourceware DOT cygnus DOT com
From: isleg AT altavista DOT com
X-Mailer: Web Mail 3.7.0.11
Subject: Bash: Problems with pattern in conditional statements

------------=_966636619-115-0
Content-Type: text/plain
Content-Disposition: inline

Hi,

Maybe I am doing something really stupid, but I can't find the solution !!!.

If I try to use a conditional statement as

if [ ABC = A* ] 
then
   echo Ok
else
   echo Error
fi

the result is 'Error' when I expect ok!
I have also tried
if [ "ABC" = "A*" ] 


Can I use patterns into conditional statements?
If I'm not wrong, I can do such kind of things in ksh.

Thanks a lot,

Isi,

_______________________________________
Isidoro Legido Martínez
isleg AT altavista DOT com
Penitentienenstraat 53
3000 Leuven (Belgium)
Tel. : + 32 16 231806
DNS : isleg.dyndns.org
_______________________________________________________________________

Free Unlimited Internet Access! Try it now! 
http://www.zdnet.com/downloads/altavista/index.html

_______________________________________________________________________


------------=_966636619-115-0
Content-Type: text/plain; name="cygcheck.out"
Content-Disposition: attachment; filename="cygcheck.out"
Content-Transfer-Encoding: 7bit


Cygnus Win95/NT Configuration Diagnostics
Current System Time: Sat Aug 19 00:01:29 2000

Win9X Ver 4.10 build 67766446  A 

Path:	/CYGWIN~1/H-I586~1/BIN
	/WINDOWS
	/WINDOWS/COMMAND

SysDir: C:\WINDOWS\SYSTEM
WinDir: C:\WINDOWS

MAKE_MODE = `UNIX'
PWD = `/bash'

!C: = `C:\CYGWIN~1'
BLASTER = `A220 I7 D1 H7 P330 T6'
CMDLINE = `bash'
COMSPEC = `C:\WINDOWS\COMMAND.COM'
CVSROOT = `:local:d:\src\master'
HOSTNAME = `isi'
HOSTTYPE = `i586'
MACHTYPE = `i586-pc-cygwin32'
OSTYPE = `cygwin32'
PROMPT = `$p$g'
SBPCI = `C:\SBPCI'
SHELL = `/bin/sh'
SHELLOPTS = `braceexpand:hashall:histexpand:monitor:history:interactive-comments:emacs'
SHLVL = `2'
TEMP = `C:\WINDOWS\TEMP'
TERM = `cygwin'
TMP = `C:\WINDOWS\TEMP'
WINBOOTDIR = `C:\WINDOWS'
WINDIR = `C:\WINDOWS'
_ = `/CYGWIN~1/H-I586~1/BIN/cygcheck'

HKEY_CURRENT_USER\Software\Cygnus Solutions
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts
HKEY_CURRENT_USER\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\00
  (default) = `C:'
  unix = `/'
  fbinary = 0x00000000
  fsilent = 0x00000000
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\CYGWIN.DLL setup
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\00
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\01
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\02
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\03
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\04
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\05
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\06
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\07
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\08
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\09
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\0A
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\0B
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\0C
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\0D
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\0E
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\0F
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\10
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\11
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\12
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\13
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\14
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\15
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\16
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\17
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\18
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\19
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\1A
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\1B
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\1C
HKEY_LOCAL_MACHINE\Software\Cygnus Solutions\CYGWIN.DLL setup\b15.0\mounts\1D

a:\ fd           N/A    N/A                    
c:\ hd  FAT32   2497Mb  64% CP    UN           
d:\ hd  FAT32   7249Mb  11% CP    UN           
e:\ cd  CDFS     397Mb 100%       UN           Isi

C:    /        native  text!=binary

Found: C:\CYGWIN~1\H-I586~1\BIN\bash.exe
Found: C:\CYGWIN~1\H-I586~1\BIN\cat.exe
Not Found: cpp (good!)
Found: C:\CYGWIN~1\H-I586~1\BIN\find.exe
Found: C:\WINDOWS\COMMAND\find.exe
Warning: C:\CYGWIN~1\H-I586~1\BIN\find.exe hides C:\WINDOWS\COMMAND\find.exe
Not Found: gcc
Not Found: gdb
Not Found: ld
Found: C:\CYGWIN~1\H-I586~1\BIN\ls.exe
Not Found: make
Found: C:\CYGWIN~1\H-I586~1\BIN\sh.exe

  446k 1998/12/04 C:\CYGWIN~1\H-I586~1\BIN\cygwin1.dll - os=4.0 img=1.0 sys=4.0
                  "cygwin1.dll" v0.0 ts=1998/12/3 20:39
Use -h to see help about each section


------------=_966636619-115-0
Content-Type: text/plain; charset=us-ascii

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
------------=_966636619-115-0--

- Raw text -


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