delorie.com/archives/browse.cgi | search |
Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT sourceware DOT cygnus DOT com> |
List-Subscribe: | <mailto:cygwin-subscribe AT sourceware DOT cygnus DOT com> |
List-Archive: | <http://sourceware.cygnus.com/ml/cygwin/> |
List-Post: | <mailto:cygwin AT sourceware DOT cygnus DOT com> |
List-Help: | <mailto:cygwin-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs> |
Sender: | cygwin-owner AT sourceware DOT cygnus DOT com |
Delivered-To: | mailing list cygwin AT sourceware DOT cygnus DOT com |
To: | cygwin AT sourceware DOT cygnus DOT com |
Date: | Sun, 31 Oct 1999 14:29:52 CST |
Subject: | FW: B20: 'ash' (not bash) parameter expansion difficulties |
Message-ID: | <19991031.154514.2567.0.DBKing@juno.com> |
X-Mailer: | Juno 1.49 |
X-Juno-Line-Breaks: | 0-122,124-128,130-137,139,141-144,146,148,150,152, |
154,156,158,160,162,164,166,168,170,172,174,176,178,180,182,184, | |
186,188,190,192,194,196,198,200,202,204,206-252,254-255,257, | |
259-260,262-263,265-268 | |
From: | David B King <dbking AT juno DOT com> |
Greetings, After further research and RTFM, I have discovered that my parameter expansion problems lie with 'ash', not 'bash' as I previously thought. The comment that highlighted my mistake was: Note that Cygwin comes with two shells: bash.exe and sh.exe, which is based on ash. The system is faster when ash is used as the non-interactive shell. In case of trouble with ash make sh.exe point to bash.exe. found in: http://sourceware.cygnus.com/cygwin/cygwin-ug-net/setup-dir.html And, indeed, using 'bash' resolves my issue. Thanks, Bart King --------- Begin forwarded message ---------- From: DBKing To: cygwin AT SourceWare DOT cygnus DOT com Subject: B20: bash parameter expansion difficulties Date: Tue, 26 Oct 1999 15:30:27 CDT Greetings, I am having trouble with the '%%' operator when doing parameter expansion in 'bash'. Below is the behavior I see: $ echo $TERM pcterm $ echo ${TERM%%rm} pct $ echo ${TERM##pc} term $ I had expected the result of "${TERM%%rm}" to be "pcte". Alas, it is not so. Note, however, that the "##" operator does work as I expect it to. Perhaps someone can tell me whether the difficulty lies with the user (myself and my expectations), with the system configuration, or with the the program (bash). To show my system configuration, I have attached the output from 'cygcheck -s -v -r' at the end of this note. Thanks to anyone who can shed some light on my questions. Enjoy, Bart King ______________________________________________________________________ D. B. (Bart) King mailto:DBKing AT Juno DOT com 16500 Lauder Lane, Suite 11101 mailto:PattiKing AT Juno DOT com Dallas, TX 75248-1766 972-380-1571 (home) 972-497-4482 (work) ----- cygcheck.out ----- Cygnus Win95/NT Configuration Diagnostics Current System Time: Tue Oct 26 09:17:31 1999 Win95 Ver 4.0 build 67109814 Path: /UTILITY /BIN /CYGNUS/CYGWIN~1/H-I586~1/BIN /HP/I/MS/OFF97PRO/32.0/OFFICE /WB /WINDOWS/COMMAND /WINDOWS /DOS SysDir: C:\WINDOWS\SYSTEM WinDir: C:\WINDOWS HOME = `/dbk' MAKE_MODE = `UNIX' !C: = `C:\develop\fina\ADS_ENG' TMP = `C:\WINDOWS\TEMP' WINBOOTDIR = `C:\WINDOWS' PROMPT = `$p$g' COMSPEC = `C:\WINDOWS\COMMAND.COM' OS_BIN = `C:\WINDOWS\COMMAND;C:\WINDOWS;C:\DOS' TEMP = `C:\TEMP' PROTMAN = `C:\WINDOWS\SYSTEM\WINA20.386' SOUND = `C:\SB16' MIDI = `SYNTH:1 MAP:E' ROOTDIR = `c:' ZSHROOT = `c:/' TMPDIR = `c:/tmp' TMPPREFIX = `c:/tmp/zsh' LOGNAME = `dbk' ENV = `c:/dbk/environ.ksh' DOSHOME = `c:\dbk' ZDOTDIR = `c:/dbk/zdotdir' TERM = `pcterm' ZSH_ISWIN95 = `YES' CYGNUS_BIN = `C:\CYGNUS\CYGWIN~1\H-I586~1\BIN' VIM = `C:\VIM-5.3' OFFICE_BIN = `C:\HP\I\MS\OFF97PRO\32.0\OFFICE' TXOBIN = `C:\WB' TXOINC = `C:\WB\INCL_480' TXOLIB = `C:\WB\LIB24' TXOCMD = `-Vp4.1' CV = `C:\WB\EM_CNV24' INCLUDE = `C:\WB\INCL_480' DEPT = `N:\Verifone\Petcaps' PERSONAL = `C:\Windows' INFONET = `K:' WINDIR = `C:\WINDOWS' BLASTER = `A220 I5 D1 H6 P330 T6' CMDLINE = `cygcheck -s -v -r ' 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\Microsoft\Windows\CurrentVersion\Uninstall\Cygnus Cygwin B20 (default) = `C:\WINDOWS\IsUninst.exe -fc:\cygnus\cygwin-b20\Uninst.isu' DisplayName = `Cygwin B20' HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin B20 HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin B20\B20.1 HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\GNUPro HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\GNUPro\i586-cygwin32 HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\GNUPro\i586-cygwin32\i586-cygwin32 HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\GNUPro\i586-cygwin32\i586-cygwin32\cygwin-B20.1 (default) = `c:\cygnus\cygwin-b20' 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 FAT N/A N/A CP UN BART_KING d:\ cd CDFS N/A N/A CP Audio CD e:\ fd N/A N/A i:\ net NTFS N/A N/A CP CS UN PA FC Users & Dep j:\ net NTFS N/A N/A CP CS UN PA FC Infonet k:\ net NTFS N/A N/A CP CS UN PA FC Infonet m:\ net NTFS N/A N/A CP CS UN PA FC n:\ net NTFS N/A N/A CP CS UN PA FC Users & Dep C: / native text!=binary Found: C:\BIN\bash.exe Found: C:\CYGNUS\CYGWIN~1\H-I586~1\BIN\bash.exe Warning: C:\BIN\bash.exe hides C:\CYGNUS\CYGWIN~1\H-I586~1\BIN\bash.exe Found: \bin\bash.exe Warning: C:\BIN\bash.exe hides \bin\bash.exe Found: C:\BIN\cat.exe Found: C:\CYGNUS\CYGWIN~1\H-I586~1\BIN\cat.exe Warning: C:\BIN\cat.exe hides C:\CYGNUS\CYGWIN~1\H-I586~1\BIN\cat.exe Found: \bin\cat.exe Warning: C:\BIN\cat.exe hides \bin\cat.exe Not Found: cpp (good!) Found: C:\BIN\find.exe Found: C:\CYGNUS\CYGWIN~1\H-I586~1\BIN\find.exe Warning: C:\BIN\find.exe hides C:\CYGNUS\CYGWIN~1\H-I586~1\BIN\find.exe Found: C:\WINDOWS\COMMAND\find.exe Warning: C:\BIN\find.exe hides C:\WINDOWS\COMMAND\find.exe Found: \bin\find.exe Warning: C:\BIN\find.exe hides \bin\find.exe Found: C:\CYGNUS\CYGWIN~1\H-I586~1\BIN\gcc.exe Found: C:\CYGNUS\CYGWIN~1\H-I586~1\BIN\gdb.exe Found: C:\CYGNUS\CYGWIN~1\H-I586~1\BIN\ld.exe Found: C:\BIN\ls.exe Found: C:\CYGNUS\CYGWIN~1\H-I586~1\BIN\ls.exe Warning: C:\BIN\ls.exe hides C:\CYGNUS\CYGWIN~1\H-I586~1\BIN\ls.exe Found: \bin\ls.exe Warning: C:\BIN\ls.exe hides \bin\ls.exe Found: C:\CYGNUS\CYGWIN~1\H-I586~1\BIN\make.exe Found: C:\BIN\sh.exe Found: C:\CYGNUS\CYGWIN~1\H-I586~1\BIN\sh.exe Warning: C:\BIN\sh.exe hides C:\CYGNUS\CYGWIN~1\H-I586~1\BIN\sh.exe Found: \bin\sh.exe Warning: C:\BIN\sh.exe hides \bin\sh.exe 371k 1998/12/01 C:\CYGNUS\CYGWIN~1\H-I586~1\BIN\cygtcl80.dll - os=4.0 img=1.0 sys=4.0 "cygtcl80.dll" v0.0 ts=1998/12/1 2:25 5k 1998/12/01 C:\CYGNUS\CYGWIN~1\H-I586~1\BIN\cygtclpip80.dll - os=4.0 img=1.0 sys=4.0 10k 1998/12/01 C:\CYGNUS\CYGWIN~1\H-I586~1\BIN\cygtclreg80.dll - os=4.0 img=1.0 sys=4.0 "cygtclreg80.dll" v0.0 ts=1998/12/1 2:25 600k 1998/12/01 C:\CYGNUS\CYGWIN~1\H-I586~1\BIN\cygtk80.dll - os=4.0 img=1.0 sys=4.0 "cygtk80.dll" v0.0 ts=1998/12/1 2:28 446k 1998/12/04 C:\CYGNUS\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 22:39 Use -h to see help about each section --------- End forwarded message ---------- ___________________________________________________________________ Get the Internet just the way you want it. Free software, free e-mail, and free Internet access for a month! Try Juno Web: http://dl.www.juno.com/dynoget/tagj. -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |