This is the mail archive of the
mailing list for the Cygwin project.
B19: bug in bash.exe using backquote to capture stdout
- To: gnu-win32 at cygnus dot com
- Subject: B19: bug in bash.exe using backquote to capture stdout
- From: Eric Holter <eholter at newpointtech dot com>
- Date: Wed, 26 Aug 1998 09:28:07 -0400
i recently found that when using bash.exe to run a shell script, the
backquote-stdout-capturing mechanism leaves carriage-return characters
in the variable. for example, i have some console utilities which use
the combination of <cr> and <lf> to indicate a newline. suppose this
utility is called 'myprog.exe' and running it simply outputs the
characters 'hello world<cr>'. if, within a bash.exe shell script i do
MYVAR = `myprog`
i find that the <cr> carriage return is not stripped out and is
contained in the variable MYVAR. thus doing something like
i would expect to see 'hello world boing', but instead i see '
newpoint technologies, inc.
For help on using this list (especially unsubscribing), send a message to
"firstname.lastname@example.org" with one line of text: "help".