public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* 1.1.8: the read command in bash does not behaive the same as in ksh
@ 2001-04-23 23:29 Sergio Del Rio
  0 siblings, 0 replies; 6+ messages in thread
From: Sergio Del Rio @ 2001-04-23 23:29 UTC (permalink / raw)
  To: cygwin

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 713 bytes --]

This was encountered with cygwin v1.1.8 under Windows 2000 Professional.

 

The following script executes fine on other unix systems but not with
cygwin and I was wondering how to get around this problem:

 

echo one two three | read v1 v2 v3

echo "v1 = ${v1}"

echo "v2 = ${v2}"

echo "v3 = ${v3}"

 

It seems that the variables are not set at all when this is done with
cygwin.

 

I have this kind of code in many places and would really appreciate an
answer.

 

Thanks!

 

Regards,

Sergio Del Rio

Templates 4 Business
Inc.

Cell: (604) 788-3604

Fax: (604) 582-7877

 






cygcheck.out
--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple


[-- Attachment #2: cygcheck.out --]
[-- Type: text/x-Algol68, Size: 10852 bytes --]


Cygnus Win95/NT Configuration Diagnostics
Current System Time: Mon Apr 23 23:26:01 2001

WinNT Ver 5.0 build 2195 Service Pack 1

Path:	/usr/local/bin
	/usr/bin
	/bin
	/cygdrive/e/Oracle/Ora8i/Apache/Perl/5.00503/bin/mswin32-x86
	/cygdrive/c/Program Files/Oracle/jre/1.1.7/bin
	/cygdrive/c/WINNT/system32
	/cygdrive/c/WINNT
	/cygdrive/c/WINNT/System32/Wbem
	/cygdrive/c/PROGRAM FILES/THINKPAD/UTILITIES
	/cygdrive/e/Oracle/Ora8i/bin
	/cygdrive/e/Oracle/Des6i/bin
	"E
	/Exceed/Accessories/"
	/cygdrive/d/Applic/csdr/Bat
	/cygdrive/d/Applic/ocs/Bat
	/cygdrive/d/Applic/sdelrio/Bat
	/cygdrive/e/SecureCRT 3.0
	/cygdrive/c/Program Files/SecureCRT 3.0
	/cygdrive/e/Microsoft/Visual Studio/Common/Tools/WinNT
	/cygdrive/e/Microsoft/Visual Studio/Common/MSDev98/Bin
	/cygdrive/e/Microsoft/Visual Studio/Common/Tools
	/cygdrive/e/Microsoft/Visual Studio/VC98/bin
	/cygdrive/f/WINDOWS
	/cygdrive/f/WINDOWS/COMMAND
	//d/applic/unix/csdr/sh
	//d/applic/unix/sdelrio/sh
	//d/applic/unix/sdelrio/bin
	//d/applic/unix/csdr/bin
	//d/applic/unix/sdelrio/dba/sh
	//d/applic/unix/sdelrio/dba/bin
	//d/applic/unix/ocs/sh
	//d/applic/unix/ocs/bin
	//d/applic/unix/t4bi/sh
	//d/applic/unix/t4bi/bin
	//d/applic/unix/t4bs/sh
	//d/applic/unix/t4bs/bin

SysDir: C:\WINNT\System32
WinDir: C:\WINNT

PWD = `//d/applic/unix'
LD_LIBRARY_PATH = `/usr/lib://e/oracle/Ora8i/lib://e/oracle/Ora8i/network/lib'
USER = `sdelrio'
MAKE_MODE = `unix'
HOME = `/home/sdelrio'

NUMBER_OF_PROCESSORS = `1'
PROMPT = `$p$g'
LOGONSERVER = `\\SDELRIO'
OS2LIBPATH = `C:\WINNT\system32\os2\dll;'
ORACLE_SID = `CSDRPRD'
LOCAL = `CSDRPRD'
COMSPEC = `C:\WINNT\system32\cmd.exe'
LISTENER_LIST = `LISTENER'
LOG_DIR = `D:\Applic\sdelrio\Log'
!C: = `C:\'
T4BI_HOME = `//d/applic/unix/t4bi'
LOCAL_BIN = `//d/applic/unix/sdelrio/sh'
USER_LOGS = `//e/oracle/admin/CSDRPRD/udump'
SYSTEMDRIVE = `C:'
HOSTNAME = `SDELRIO'
LOG_FILE_HISTORY = `7'
BACKUP_DMP_HISTORY = `2'
INCLUDE = `E:\Microsoft\Visual Studio\VC98\atl\include;E:\Microsoft\Visual Studio\VC98\mfc\include;E:\Microsoft\Visual Studio\VC98\include'
PROCESSOR_REVISION = `0803'
MSDEVDIR = `E:\Microsoft\Visual Studio\Common\MSDev98'
GREP = `/usr/bin/grep'
PATHEXT = `.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH'
COMPUTERNAME = `SDELRIO'
BACKUP_LOG_HISTORY = `7'
BACKUP_HOST_LIST = `'
ARCHIVE_COPY_PURGE = `0'
!E: = `E:\cygwin\bin'
WV_GATEWAY_CFG = `E:\Oracle\Ora8i\Apache\modplsql\cfg\wdbsvr.app'
DO_HOT_BACKUP = `NO'
CLASSPATH = `E:\Exceed\hcljrcsv.jar;;'
WINDIR = `C:\WINNT'
USERPROFILE = `C:\Documents and Settings\sdelrio'
COMPLEX_LOGS = `//d/applic/unix/sdelrio/log'
T4BS_HOME = `//d/applic/unix/t4bs'
MANPATH = `/usr/local/man'
ORACLE_ADMIN = `//e/oracle/admin'
WINBOOTDIR = `F:\WINDOWS'
PS1 = `SDELRIO:$PWD> '
GMS_LOG_DIR = `//e/oracle/Ora8i/ops/log'
PROGRAMFILES = `C:\Program Files'
ARCHIVE_PATH = `//e/oracle/admin/CSDRPRD/arch'
CSDR_ORA_OLD_CALLS = `YES'
BACKUP_SID_LIST = `'
!:: = `::\'
OCS_LOGS = `//d/applic/unix/ocs/log'
BACKUP_DEVICE = `rmt0'
MACHTYPE = `i686-pc-cygwin'
USER_HOME = `//d'
PROCESSOR_IDENTIFIER = `x86 Family 6 Model 8 Stepping 3, GenuineIntel'
SQLPATH = `D:\Applic\csdr\sql;D:\Applic\csdr\DBA\sql;D:\Applic\csdr\DBA\mon;D:\Applic\ocs\sql;D:\Applic\t4bi\sql;D:\Applic\sdelrio\sql;D:\Applic\t4bs\sql:.:/home/sdelrio/sql://d/applic/unix/csdr/sql://d/applic/unix/csdr/dba/sql://d/applic/unix/csdr/dba/mon://d/applic/unix/sdelrio/dba/sql://d/applic/unix/ocs/sql://d/applic/unix/sdelrio/sql://d/applic/unix/t4bi/sql://d/applic/unix/t4bs/sql'
USER_OUT = `//e/oracle/admin/CSDRPRD/out'
CSDR_OVERRIDE_DONE = `YES'
OS = `Windows_NT'
BACKUP_ARCHIVE_LOG_PURGE = `7'
OLDPWD = `/'
SED = `/usr/bin/sed'
GMS_HC_SOCKET = `/tmp/serv.hc'
BACKUP_ARCHIVE_LOGS = `NO'
PROCESSOR_ARCHITECTURE = `x86'
TEMP = `/cygdrive/c/DOCUME~1/sdelrio/LOCALS~1/Temp'
AWK = `/usr/bin/awk'
EDITOR = `vi'
PROCESSOR_LEVEL = `6'
SYSTEMROOT = `C:\WINNT'
ORACLE_BASE = `//e/oracle'
LIBPATH = `/usr/lib://e/oracle/Ora8i/lib'
HOST = `SDELRIO'
DO_TAPE_BACKUP = `YES'
COMPLEX_BASE = `sdelrio'
ORACLE_HOME = `E:\Oracle\Ora8i'
DO_EXPORT = `YES'
BACKUP_COMMAND = `'
COMPLEX_HOME = `//d/applic/unix/sdelrio'
CSDR_HOME = `//d/applic/unix/csdr'
HOMEDRIVE = `C:'
LIB = `E:\Microsoft\Visual Studio\VC98\mfc\lib;E:\Microsoft\Visual Studio\VC98\lib'
MASKS = `//d/applic/unix/csdr/dba/masks'
ALLUSERSPROFILE = `C:\Documents and Settings\All Users'
APPLIC_HOME = `//d/applic/unix'
SHLVL = `1'
DBA = `//d/applic/unix/sdelrio/dba'
T4BI_LOGS = `//d/applic/unix/t4bi/log'
APPDATA = `C:\Documents and Settings\sdelrio\Application Data'
COMMONPROGRAMFILES = `C:\Program Files\Common Files'
HOMEPATH = `\'
USERDOMAIN = `SDELRIO'
GMS_NODE_LIST = `//e/oracle/admin/ops/gms.conf'
OCS_HOME = `//d/applic/unix/ocs'
CSDRDBA = `//d/applic/unix/csdr/dba'
ORAENV_ASK = `NO'
UNIX_VERSION = `CYGWIN'
DB_LOGS = `//e/oracle/admin/CSDRPRD/bdump'
USERNAME = `sdelrio'
SHELL = `/bin/sh'
HOSTTYPE = `i686'
OLD_ORACLE_HOME = `//e/oracle/Ora8i'
T4BS_USER = `t4bi_sys'
OSTYPE = `cygwin'
CSDRSH = `//d/applic/unix/csdr/sh'
TERM = `cygwin'
SOFTWARE_MOUNT = `//e'
CSDRBIN = `//d/applic/unix/csdr/bin'
T4BS_LOGS = `//d/applic/unix/t4bs/log'
_ = `/usr/bin/cygcheck'
TZ = `PST8PDT7,M4.1.0/2,M10.5.0/2'

HKEY_CURRENT_USER\Software\Cygnus Solutions
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2
  (default) = `/cygdrive'
  cygdrive flags = 0x00000022
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\Program Options
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\MenuOrder\Start Menu\Programs\Cygnus Solutions
  (default) = (unsupported type)
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/
  (default) = `E:/cygwin'
  flags = 0x0000000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/usr/bin
  (default) = `E:/cygwin/bin'
  flags = 0x0000000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/usr/lib
  (default) = `E:/cygwin/lib'
  flags = 0x0000000a
HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\Program Options

c:  hd  FAT32   4759Mb  65% CP    UN           WIN2000
d:  hd  FAT32   4759Mb  83% CP    UN           DATA
e:  hd  FAT32   4759Mb  92% CP    UN           PROGRAMS
f:  hd  FAT32   4759Mb  51% CP    UN           WINME
g:  cd           N/A    N/A                    
u:  net NTFS    9538Mb  34% CP CS UN PA FC     Programs2
y:  net NTFS    9538Mb  51% CP CS UN PA FC     Data
z:  net NTFS    9538Mb  34% CP CS UN PA FC     Programs2

E:\cygwin\bin  /usr/bin  system  binmode
E:\cygwin\lib  /usr/lib  system  binmode
E:\cygwin  /        system  binmode

Found: E:\cygwin\bin\bash.exe
Found: E:\cygwin\bin\cat.exe
Found: E:\cygwin\bin\cpp.exe
Found: E:\cygwin\bin\find.exe
Found: f:\WINDOWS\COMMAND\find.exe
Warning: E:\cygwin\bin\find.exe hides f:\WINDOWS\COMMAND\find.exe
Found: E:\cygwin\bin\gcc.exe
Found: E:\cygwin\bin\gdb.exe
Found: E:\cygwin\bin\ld.exe
Found: E:\cygwin\bin\ls.exe
Found: E:\cygwin\bin\make.exe
Found: E:\cygwin\bin\sh.exe

   56k 2000/12/03 E:\cygwin\bin\cygbz21.0.dll - os=4.0 img=1.0 sys=4.0
                  "cygbz21.0.dll" v0.0 ts=2000/11/20 15:53
   18k 2000/10/23 E:\cygwin\bin\cyggdbm.dll - os=4.0 img=1.0 sys=4.0
                  "cyggdbm.dll" v0.0 ts=2000/10/22 19:26
   14k 2000/10/23 E:\cygwin\bin\cygintl.dll - os=4.0 img=1.0 sys=4.0
                  "cygintl.dll" v0.0 ts=2000/10/23 12:02
   45k 2000/10/22 E:\cygwin\bin\cygjbig1.dll - os=4.0 img=1.0 sys=4.0
                  "cygjbig1.dll" v0.0 ts=2000/10/22 16:06
  119k 2000/10/23 E:\cygwin\bin\cygjpeg6b.dll - os=4.0 img=1.0 sys=4.0
                  "cygjpeg6b.dll" v0.0 ts=2000/10/22 17:58
  163k 2001/02/03 E:\cygwin\bin\cygpng2.dll - os=4.0 img=1.0 sys=4.0
                  "cygpng2.dll" v0.0 ts=2001/2/3 13:21
   82k 2001/01/21 E:\cygwin\bin\cygform5.dll - os=4.0 img=1.0 sys=4.0
                  "cygform5.dll" v0.0 ts=2001/1/21 12:39
   53k 2001/01/21 E:\cygwin\bin\cygmenu5.dll - os=4.0 img=1.0 sys=4.0
                  "cygmenu5.dll" v0.0 ts=2001/1/21 12:39
  414k 2001/01/21 E:\cygwin\bin\cygncurses++5.dll - os=4.0 img=1.0 sys=4.0
                  "cygncurses++5.dll" v0.0 ts=2001/1/21 12:40
  299k 2001/01/21 E:\cygwin\bin\cygncurses5.dll - os=4.0 img=1.0 sys=4.0
                  "cygncurses5.dll" v0.0 ts=2001/1/21 12:38
   34k 2001/01/21 E:\cygwin\bin\cygpanel5.dll - os=4.0 img=1.0 sys=4.0
                  "cygpanel5.dll" v0.0 ts=2001/1/21 12:38
   17k 2001/01/07 E:\cygwin\bin\cyghistory4.dll - os=4.0 img=1.0 sys=4.0
                  "cyghistory4.dll" v0.0 ts=2001/1/6 20:34
  108k 2001/01/07 E:\cygwin\bin\cygreadline4.dll - os=4.0 img=1.0 sys=4.0
                  "cygreadline4.dll" v0.0 ts=2001/1/6 20:34
   81k 2000/12/05 E:\cygwin\bin\cygitcl30.dll - os=4.0 img=1.0 sys=4.0
                  "cygitcl30.dll" v0.0 ts=2000/11/25 17:43
   35k 2000/12/05 E:\cygwin\bin\cygitk30.dll - os=4.0 img=1.0 sys=4.0
                  "cygitk30.dll" v0.0 ts=2000/11/25 17:43
  390k 2000/12/05 E:\cygwin\bin\cygtcl80.dll - os=4.0 img=1.0 sys=4.0
                  "cygtcl80.dll" v0.0 ts=2000/11/25 17:39
    5k 2000/12/05 E:\cygwin\bin\cygtclpip80.dll - os=4.0 img=1.0 sys=4.0
   10k 2000/12/05 E:\cygwin\bin\cygtclreg80.dll - os=4.0 img=1.0 sys=4.0
                  "cygtclreg80.dll" v0.0 ts=2000/11/25 17:39
  623k 2000/12/05 E:\cygwin\bin\cygtk80.dll - os=4.0 img=1.0 sys=4.0
                  "cygtk80.dll" v0.0 ts=2000/11/25 17:43
  243k 2000/10/23 E:\cygwin\bin\cygtiff3.dll - os=4.0 img=1.0 sys=4.0
                  "cygtiff3.dll" v0.0 ts=2000/10/22 18:14
   41k 2000/11/20 E:\cygwin\bin\cygXpm-noX4.dll - os=4.0 img=1.0 sys=4.0
                  "cygXpm-noX4.dll" v0.0 ts=2000/11/19 18:41
   45k 2000/11/20 E:\cygwin\bin\cygXpm-X4.dll - os=4.0 img=1.0 sys=4.0
                  "cygXpm-X4.dll" v0.0 ts=2000/11/19 18:45
   49k 2001/02/03 E:\cygwin\bin\cygz.dll - os=4.0 img=1.0 sys=4.0
                  "cygz.dll" v0.0 ts=2001/2/3 12:35
  615k 2001/01/31 E:\cygwin\bin\cygwin1.dll - os=4.0 img=1.0 sys=4.0
                  "cygwin1.dll" v0.0 ts=2001/1/31 7:08
    Cygwin DLL version info:
        dll major: 1001
        dll minor: 8
        dll epoch: 19
        dll bad signal mask: 19005
        dll old termios: 5
        dll malloc env: 28
        api major: 0
        api minor: 34
        shared data: 3
        dll identifier: cygwin1
        mount registry: 2
        cygnus registry name: Cygnus Solutions
        cygwin registry name: Cygwin
        program options name: Program Options
        cygwin mount registry name: mounts v2
        cygdrive flags: cygdrive flags
        cygdrive prefix: cygdrive prefix
        cygdrive default prefix: 
        build date: Wed Jan 31 10:08:38 EST 2001
        shared id: cygwin1S3

Use -h to see help about each section


^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: 1.1.8: the read command in bash does not behaive the same as in ksh
@ 2001-04-24 11:35 Troy Noble
  0 siblings, 0 replies; 6+ messages in thread
From: Troy Noble @ 2001-04-24 11:35 UTC (permalink / raw)
  To: 'Bob McGowan', cygwin

should it not be easy to write a sed, awk , or perl script
to go through your scripts and change all instances of:

echo hi | read v1

to the more commonly acceptable form:

v1="hi"

seems like a fairly mechanical change and would make your scripts
compatible with bash.  In cases where you have echo a b c d, just
use the built-in splitting capability of sed or perl to figure
out how many you've got, then emit the right number of assignments.
If you need them passed to subprocesses, tack an "export " on
the front.

Plus it'll run faster since you're not doing the pipe thing every
time.

Just a suggestion.

Troy

-----Original Message-----
From: Bob McGowan [ mailto:rmcgowan@veritas.com ]
Sent: Tuesday, April 24, 2001 10:47 AM
To: cygwin@cygwin.com
Subject: Re: 1.1.8: the read command in bash does not behaive the same
as in ksh


From the pdksh web page ( http://web.cs.mun.ca/~michael/pdksh/ ):

  Its weak points are that there are still a few differences from ksh88 (the
major one is that `echo hi | read x' does not set x in the current shell -
the
read is done in a separate process).


Troy Noble wrote:
> 
> pdksh is listed on the cygwin ported software links page:
> 
>
http://www.hirmke.de/software/develop/gnuwin32/cygwin/porters/Hirmke_Michael
> /GNUWin32-links.html
> 
> and more specifically:
> 
>
http://www.hirmke.de/software/develop/gnuwin32/cygwin/porters/Hirmke_Michael
> /GNUWin32-links.html#pdksh-5.2.13.x
> 
> which will ultimately get you to:
> 
>
http://www.hirmke.de/software/develop/gnuwin32/cygwin/porters/Vinschen_Corin
> na/B20/pdksh-5.2.13.x.README
> 
> -----Original Message-----
> From: Robinow, David [ mailto:drobinow@dayton.adroit.com ]
> Sent: Tuesday, April 24, 2001 6:04 AM
> To: 'sdelrio@home.com'; cygwin@cygwin.com
> Subject: RE: 1.1.8: the read command in bash does not behaive the same
> as in ksh
> 
> You've answered your own question.  ksh does what you want. bash doesn't
> bash doesn't work that way on other unix systems either. This has nothing
> to do with cygwin. The solution is to use ksh as your shell. (No, I don't
> know
> where to get it.)
> 
> -----Original Message-----
> From: Sergio Del Rio [ mailto:sdelrio@home.com ]
> Sent: Tuesday, April 24, 2001 2:26 AM
> To: cygwin@cygwin.com
> Subject: 1.1.8: the read command in bash does not behaive the same as in
ksh
> 
> This was encountered with cygwin v1.1.8 under Windows 2000 Professional.
> 
> 
> 
> The following script executes fine on other unix systems but not with
cygwin
> and I was wondering how to get around this problem:
> 
> 
> 
> echo one two three | read v1 v2 v3
> 
> echo "v1 = ${v1}"
> 
> echo "v2 = ${v2}"
> 
> echo "v3 = ${v3}"
> 
> 
> 
> It seems that the variables are not set at all when this is done with
> cygwin.
> 
> 
> 
> I have this kind of code in many places and would really appreciate an
> answer.
> 
> 
> 
> Thanks!
> 
> 
> 
> Regards,
> 
> Sergio Del Rio
> 
> Templates 4 Business Inc.
> 
> Cell: (604) 788-3604
> 
> Fax: (604) 582-7877
> 
> 
> 
> --
> Want to unsubscribe from this list?
> Check out: http://cygwin.com/ml/#unsubscribe-simple
> 
> --
> Want to unsubscribe from this list?
> Check out: http://cygwin.com/ml/#unsubscribe-simple

-- 
Bob McGowan
Staff Development Engineer
VERITAS Software
rmcgowan@veritas.com

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: 1.1.8: the read command in bash does not behaive the same as in ksh
  2001-04-24  7:39 Troy Noble
@ 2001-04-24  9:47 ` Bob McGowan
  0 siblings, 0 replies; 6+ messages in thread
From: Bob McGowan @ 2001-04-24  9:47 UTC (permalink / raw)
  To: cygwin

From the pdksh web page ( http://web.cs.mun.ca/~michael/pdksh/ ):

  Its weak points are that there are still a few differences from ksh88 (the
major one is that `echo hi | read x' does not set x in the current shell - the
read is done in a separate process).


Troy Noble wrote:
> 
> pdksh is listed on the cygwin ported software links page:
> 
> http://www.hirmke.de/software/develop/gnuwin32/cygwin/porters/Hirmke_Michael
> /GNUWin32-links.html
> 
> and more specifically:
> 
> http://www.hirmke.de/software/develop/gnuwin32/cygwin/porters/Hirmke_Michael
> /GNUWin32-links.html#pdksh-5.2.13.x
> 
> which will ultimately get you to:
> 
> http://www.hirmke.de/software/develop/gnuwin32/cygwin/porters/Vinschen_Corin
> na/B20/pdksh-5.2.13.x.README
> 
> -----Original Message-----
> From: Robinow, David [ mailto:drobinow@dayton.adroit.com ]
> Sent: Tuesday, April 24, 2001 6:04 AM
> To: 'sdelrio@home.com'; cygwin@cygwin.com
> Subject: RE: 1.1.8: the read command in bash does not behaive the same
> as in ksh
> 
> You've answered your own question.  ksh does what you want. bash doesn't
> bash doesn't work that way on other unix systems either. This has nothing
> to do with cygwin. The solution is to use ksh as your shell. (No, I don't
> know
> where to get it.)
> 
> -----Original Message-----
> From: Sergio Del Rio [ mailto:sdelrio@home.com ]
> Sent: Tuesday, April 24, 2001 2:26 AM
> To: cygwin@cygwin.com
> Subject: 1.1.8: the read command in bash does not behaive the same as in ksh
> 
> This was encountered with cygwin v1.1.8 under Windows 2000 Professional.
> 
> 
> 
> The following script executes fine on other unix systems but not with cygwin
> and I was wondering how to get around this problem:
> 
> 
> 
> echo one two three | read v1 v2 v3
> 
> echo "v1 = ${v1}"
> 
> echo "v2 = ${v2}"
> 
> echo "v3 = ${v3}"
> 
> 
> 
> It seems that the variables are not set at all when this is done with
> cygwin.
> 
> 
> 
> I have this kind of code in many places and would really appreciate an
> answer.
> 
> 
> 
> Thanks!
> 
> 
> 
> Regards,
> 
> Sergio Del Rio
> 
> Templates 4 Business Inc.
> 
> Cell: (604) 788-3604
> 
> Fax: (604) 582-7877
> 
> 
> 
> --
> Want to unsubscribe from this list?
> Check out: http://cygwin.com/ml/#unsubscribe-simple
> 
> --
> Want to unsubscribe from this list?
> Check out: http://cygwin.com/ml/#unsubscribe-simple

-- 
Bob McGowan
Staff Development Engineer
VERITAS Software
rmcgowan@veritas.com

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: 1.1.8: the read command in bash does not behaive the same as  in ksh
@ 2001-04-24  7:39 Troy Noble
  2001-04-24  9:47 ` Bob McGowan
  0 siblings, 1 reply; 6+ messages in thread
From: Troy Noble @ 2001-04-24  7:39 UTC (permalink / raw)
  To: 'Robinow, David', 'sdelrio@home.com', cygwin

pdksh is listed on the cygwin ported software links page:

http://www.hirmke.de/software/develop/gnuwin32/cygwin/porters/Hirmke_Michael
/GNUWin32-links.html

and more specifically:

http://www.hirmke.de/software/develop/gnuwin32/cygwin/porters/Hirmke_Michael
/GNUWin32-links.html#pdksh-5.2.13.x

which will ultimately get you to:

http://www.hirmke.de/software/develop/gnuwin32/cygwin/porters/Vinschen_Corin
na/B20/pdksh-5.2.13.x.README




-----Original Message-----
From: Robinow, David [ mailto:drobinow@dayton.adroit.com ]
Sent: Tuesday, April 24, 2001 6:04 AM
To: 'sdelrio@home.com'; cygwin@cygwin.com
Subject: RE: 1.1.8: the read command in bash does not behaive the same
as in ksh


You've answered your own question.  ksh does what you want. bash doesn't
bash doesn't work that way on other unix systems either. This has nothing
to do with cygwin. The solution is to use ksh as your shell. (No, I don't
know
where to get it.)

-----Original Message-----
From: Sergio Del Rio [ mailto:sdelrio@home.com ]
Sent: Tuesday, April 24, 2001 2:26 AM
To: cygwin@cygwin.com
Subject: 1.1.8: the read command in bash does not behaive the same as in ksh



This was encountered with cygwin v1.1.8 under Windows 2000 Professional.

 

The following script executes fine on other unix systems but not with cygwin
and I was wondering how to get around this problem:

 

echo one two three | read v1 v2 v3

echo "v1 = ${v1}"

echo "v2 = ${v2}"

echo "v3 = ${v3}"

 

It seems that the variables are not set at all when this is done with
cygwin.

 

I have this kind of code in many places and would really appreciate an
answer.

 

Thanks!

 

Regards,

Sergio Del Rio

Templates 4 Business Inc.

Cell: (604) 788-3604

Fax: (604) 582-7877

 


--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: 1.1.8: the read command in bash does not behaive the same as in ksh
@ 2001-04-24  5:03 Robinow, David
  0 siblings, 0 replies; 6+ messages in thread
From: Robinow, David @ 2001-04-24  5:03 UTC (permalink / raw)
  To: 'sdelrio@home.com', cygwin

You've answered your own question.  ksh does what you want. bash doesn't
bash doesn't work that way on other unix systems either. This has nothing
to do with cygwin. The solution is to use ksh as your shell. (No, I don't
know
where to get it.)

-----Original Message-----
From: Sergio Del Rio [ mailto:sdelrio@home.com ]
Sent: Tuesday, April 24, 2001 2:26 AM
To: cygwin@cygwin.com
Subject: 1.1.8: the read command in bash does not behaive the same as in ksh



This was encountered with cygwin v1.1.8 under Windows 2000 Professional.

 

The following script executes fine on other unix systems but not with cygwin
and I was wondering how to get around this problem:

 

echo one two three | read v1 v2 v3

echo "v1 = ${v1}"

echo "v2 = ${v2}"

echo "v3 = ${v3}"

 

It seems that the variables are not set at all when this is done with
cygwin.

 

I have this kind of code in many places and would really appreciate an
answer.

 

Thanks!

 

Regards,

Sergio Del Rio

Templates 4 Business Inc.

Cell: (604) 788-3604

Fax: (604) 582-7877

 


--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: 1.1.8: the read command in bash does not behaive the same as in ksh
@ 2001-04-23 23:58 Neil Lunn
  0 siblings, 0 replies; 6+ messages in thread
From: Neil Lunn @ 2001-04-23 23:58 UTC (permalink / raw)
  To: 'sdelrio@home.com', cygwin

read is a built-in, you cannot pipe to it.

-----Original Message-----
From: Sergio Del Rio [ mailto:sdelrio@home.com ]
Sent: Tuesday, April 24, 2001 4:26 PM
To: cygwin@cygwin.com
Subject: 1.1.8: the read command in bash does not behaive the same as in ksh


This was encountered with cygwin v1.1.8 under Windows 2000 Professional.
 
The following script executes fine on other unix systems but not with cygwin
and I was wondering how to get around this problem:
 
echo one two three | read v1 v2 v3
echo "v1 = ${v1}"
echo "v2 = ${v2}"
echo "v3 = ${v3}"
 
It seems that the variables are not set at all when this is done with
cygwin.
 
I have this kind of code in many places and would really appreciate an
answer.
 
Thanks!
 
Regards,
Sergio Del Rio
Templates 4 Business Inc.
Cell: (604) 788-3604
Fax: (604) 582-7877
 

__________________________________________________________________________
Please Note :
Only  the intended recipient is authorised to access or use this e-mail.  If
you are not the intended recipient,
please delete this e-mail and notify the sender immediately.   The contents
of this e-mail are the writer's 
opinion and are not necessarily endorsed by the Gunz Companies unless
expressly stated.

We use virus scanning software but exclude all liability for viruses or
similar in any attachment.



--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2001-04-24 11:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-23 23:29 1.1.8: the read command in bash does not behaive the same as in ksh Sergio Del Rio
2001-04-23 23:58 Neil Lunn
2001-04-24  5:03 Robinow, David
2001-04-24  7:39 Troy Noble
2001-04-24  9:47 ` Bob McGowan
2001-04-24 11:35 Troy Noble

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).