Challenge: a VERY strange problem with command substitution in bash

Steven Penny svnpenn@gmail.com
Tue Jul 11 23:22:00 GMT 2017


On Tue, 11 Jul 2017 21:12:14, =?UTF-8?Q?J=c3=bcrgen_Wagner?= wrote:
> 2. Windows 10, Version 1703, Build 15063.413 on a Dell 64bit platform,
> latest 64bit Cygwin (CYGWIN_NT-10.0, 2.8.1(0.312/5/3) 2017-07-03 14:11
> x86_64 Cygwin) /bin/bash
> 
> $ value=3D"$( date | cat )"; echo "$? <$value>"
> 127 <>

For what it is worth, I cannot repro this with Windows 7:

    $ value="$( date | cat )"; echo "$? <$value>"
    0 <Tue, Jul 11, 2017  6:16:21 PM>

Also, your example is poor. As you well know, "cat" in this case should be a
noop:

    $ date | cat
    Tue, Jul 11, 2017  6:20:53 PM

Perhaps you can provide a sane example that fails? Something like:

    $ date | sed s/M/Z/
    Tue, Jul 11, 2017  6:21:46 PZ


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list