Cygwin bash script does not work on pipes if source

I installed Cygwin x64 on Windows 7 with no changes by default. I copied the home environment from another computer on which Cygwin has been working happily for many years. This time at login (bash) there is an almost endless stream of errors that I narrowed down to the next problem. This very small script behaves differently when called, usually in contrast to the source.

echo test
echo test | cat
echo t`echo es`t
echo t`echo es | cat`t
echo t$(echo es)t
echo t$(echo es | cat)t

The script output runs fine:

test
test
test
test
test
test

Script output on source:

test
test
test
tt
test
tt

The pipes inside the code, which should run as sub-shells, seem to be broken into my installation.

Am I missing something obvious? Is there a magical setting that I don’t know about that everything is OK again?

+4
1

, , - , . 32- Cygwin 64- , script , . , .

, !

0

Source: https://habr.com/ru/post/1679520/


All Articles