bash: '\n' after command substitution in $PS1 causes errors when igncr is set

2024-05-22 Thread Ken Takata via Cygwin
Hello all, I originally reported this issue to the msys2 team: https://github.com/msys2/MSYS2-packages/issues/1839 https://github.com/msys2/MSYS2-packages/pull/4477 But I find that this issue is coming from Cygwin Bash, so I'm reporting here. When I use \n after command substitution in $PS

Re: Challenge: a VERY strange problem with command substitution in bash

2017-12-04 Thread Brian Inglis
On 2017-12-04 06:22, David Macek wrote: > On 4. 12. 2017 14:01, Erik Haukjær Andersen wrote: >> Hello >> >> >> I have seen a similar problem on Windows 7, using Cygwin bash version >> 4.4.12(3)-release (x86_64-unknown-cygwin). >> >> After repeating a simplified test on my own host and 6 other >> co

Re: Challenge: a VERY strange problem with command substitution in bash

2017-12-04 Thread Andrey Repin
Greetings, Erik Haukjær Andersen! > (I saw you wrote something about TrustedInstaller). TrustedInstalller is a Windows component. %SystemRoot%\servicing\TrustedInstaller.exe -- With best regards, Andrey Repin Monday, December 4, 2017 23:08:53 Sorry for my terrible english...

Re: Challenge: a VERY strange problem with command substitution in bash

2017-12-04 Thread David Macek
On 4. 12. 2017 14:01, Erik Haukjær Andersen wrote: Hello I have seen a similar problem on Windows 7, using Cygwin bash version 4.4.12(3)-release (x86_64-unknown-cygwin). After repeating a simplified test on my own host and 6 other colleagues, my conclusion is that the cause is found in BeyondT

Re: Challenge: a VERY strange problem with command substitution in bash

2017-12-04 Thread Erik Haukjær Andersen
Hello I have seen a similar problem on Windows 7, using Cygwin bash version 4.4.12(3)-release (x86_64-unknown-cygwin). After repeating a simplified test on my own host and 6 other colleagues, my conclusion is that the cause is found in BeyondTrust SecureDesktop, which you also may have installed

Re: bash command substitution

2017-10-02 Thread Vukovics Mihály
work. At a specific line there is a command substitution trying to get result from ffprobe: VHEIGHT=$(ffprobe -v error -show_entries stream=width,height -of default=noprint_wrappers=1 ${OLDFILE} | grep "height" | cut -f2 -d'=') For debugging purpose the same command is executed

Re: bash command substitution

2017-10-01 Thread Brian Inglis
On 2017-10-01 00:40, Vukovics Mihaly wrote: > I just wanted to use my bash script written in Debian 8 in cygwin(latest, > win10 > 64bit), but does not work. > At a specific line there is a command substitution trying to get result from > ffprobe: > VHEIGHT=$(ffprobe -v error -s

Re: bash command substitution

2017-10-01 Thread Wouter van Doorn
Try the following: echo $(echo hello | cat) If that remains empty, (it should of course result in 'hello') you're suffering from the same problem I have. And no, I did not get it resolved. In which case I'd be elated if you could get anyone interested in finding a solution! If this happens to yo

Re: bash command substitution

2017-10-01 Thread Steven Penny
On Sun, 1 Oct 2017 08:40:51, Vukovics Mihaly wrote: VHEIGHT=$(ffprobe -v error -show_entries stream=width,height -of default=noprint_wrappers=1 ${OLDFILE} | grep "height" | cut -f2 -d'=') For debugging purpose the same command is executed without putting the result into a variable, and works!

Re: bash command substitution

2017-10-01 Thread Marco Atzeri
On 01/10/2017 08:40, Vukovics Mihaly wrote: Hello All, I just wanted to use my bash script written in Debian 8 in cygwin(latest, win10 64bit), but does not work. At a specific line there is a command substitution trying to get result from ffprobe: VHEIGHT=$(ffprobe -v error -show_entries

bash command substitution

2017-09-30 Thread Vukovics Mihaly
Hello All, I just wanted to use my bash script written in Debian 8 in cygwin(latest, win10 64bit), but does not work. At a specific line there is a command substitution trying to get result from ffprobe: VHEIGHT=$(ffprobe -v error -show_entries stream=width,height -of default

Re: Challenge: a VERY strange problem with command substitution in bash

2017-07-28 Thread Jürgen Wagner
t 15:12, Shakespearean monkeys danced on Jürgen > Wagner's keyboard and said: >> ... >> Using backquotes instead of the command substitution with $(...) does >> not change the results. I could swear this did work in an earlier >> version of Cygwin on my Windows 7 mach

Re: Challenge: a VERY strange problem with command substitution in bash

2017-07-11 Thread Wouter van Doorn
ly 2017 at 00:22, Richard Beels via cygwin wrote: > At 07/11/2017 at 15:12, Shakespearean monkeys danced on Jürgen Wagner's > keyboard and said: >> >> ... >> Using backquotes instead of the command substitution with $(...) does not >> change the results. I could

Re: Challenge: a VERY strange problem with command substitution in bash

2017-07-11 Thread Richard Beels via cygwin
At 07/11/2017 at 15:12, Shakespearean monkeys danced on Jürgen Wagner's keyboard and said: ... Using backquotes instead of the command substitution with $(...) does not change the results. I could swear this did work in an earlier version of Cygwin on my Windows 7 machine. I tried th

Re: Challenge: a VERY strange problem with command substitution in bash

2017-07-11 Thread Steven Penny
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

Re: Challenge: a VERY strange problem with command substitution in bash

2017-07-11 Thread Jürgen Wagner
the other Cygwin installation is 4.4.12(3)-release. The command substitution with a pipe doesn't work there. smime.p7s Description: S/MIME Cryptographic Signature

Re: Challenge: a VERY strange problem with command substitution in bash

2017-07-11 Thread Jürgen Wagner
Sorry, little omission: the first example under section 3 is not with bash, it was done with dash. smime.p7s Description: S/MIME Cryptographic Signature

Challenge: a VERY strange problem with command substitution in bash

2017-07-11 Thread Jürgen Wagner
( date | cat )"; echo "$? <$value>" 0 $ value="$( bash -c 'date | cat' )"; echo "$? <$value>" 0 # value="$( date ; pwd )"; echo "$? <$value>" 0 Using backquotes instead of the command substitution with $(...) do

Re: Pipe after Command Substitution does not resolve the substitution:

2017-06-14 Thread Jon Bord
Firstly, i should clarify the problem definition asap by including this fourth example which shows a pipe working fine when it is not preceded by command substitution: $ grep 2 test.txt | grep 3 grep 2 test.txt | grep 3 + grep 2 test.txt + grep 3 23 Thanks Brian for all the suggestions and for

Re: Pipe after Command Substitution does not resolve the substitution:

2017-06-14 Thread Jon Bord
Thanks loads for the reply Marco and for testing. It's much appreciated. Just to confirm, it also ran fine for me on W7 64 with cygwin 64bit. This issue is now on W10 64 with cygwin 64bit. Is this the output from cygcheck that you mean? I've marked where i've ommitted some of the -s output. It's

Re: Pipe after Command Substitution does not resolve the substitution:

2017-06-14 Thread Brian Inglis
itted by law. and run and attach output as text: $ cygcheck -svr > cygcheck.out > $ set -xv > (EXAMPLE 1: COMMAND SUBSTITUTION WORKS AS EXPECTED) > $ grep 2 $(ls | tail -1) > grep 2 $(ls | tail -1) > ++ ls > ++ tail -1 > + grep 2 test.txt > 2 > 23 > (EXAMPLE 2

Re: Pipe after Command Substitution does not resolve the substitution:

2017-06-14 Thread Marco Atzeri
On 14/06/2017 09:41, Jon Bord wrote: Hi, This is the first time i've ever submitted a bug report so i hope the below is ok. I am not a programmer although i do do some scripting. The below is the kind of 'command substitution then pipe' that i often used in Cygwin on Windows 7.

Pipe after Command Substitution does not resolve the substitution:

2017-06-14 Thread Jon Bord
Hi, This is the first time i've ever submitted a bug report so i hope the below is ok. I am not a programmer although i do do some scripting. The below is the kind of 'command substitution then pipe' that i often used in Cygwin on Windows 7. Now that i've been forced to move

Re: Broken bash command substitution

2016-11-26 Thread L. A. Walsh
Gerrit Haase wrote: 2016-11-24 17:25 GMT+01:00 L. A. Walsh says: Tydus wrote: You didn't specify what version of bash you are running. Therefore he attached the cygcheck output which says: bash 4.3.46-7 --- Is that the same version as he's running on linux?

Re: Broken bash command substitution

2016-11-25 Thread Gerrit Haase
2016-11-24 17:25 GMT+01:00 L. A. Walsh says: > Tydus wrote: > > > You didn't specify what version of bash you are running. Therefore he attached the cygcheck output which says: bash 4.3.46-7 ;) Gerrit -- Problem reports: http://cygwin.com/problems.html FAQ:

Re: Broken bash command substitution

2016-11-24 Thread L. A. Walsh
Tydus wrote: Dear list, I use Cygwin64 for a long time and everything went well. However, after one setup.exe update, the command substitution (`foo`) is broken on bash. You didn't specify what version of bash you are running. Since here: $ ssh a-linux-server $ A=`echo 123

Broken bash command substitution

2016-11-24 Thread Tydus
Dear list, I use Cygwin64 for a long time and everything went well. However, after one setup.exe update, the command substitution (`foo`) is broken on bash. How to reproduce: $ echo "===`echo 123`===" ===123=== $ echo "===`echo 123 | cat`===" ===123=== $ A=`echo 123`; ec

RE: Problem with command substitution in mksh shell after upgrading to Cygwin 1.7.26

2013-12-04 Thread PRIKHODKO, GEORGE
Hi, The fix did help. Thank you. Thanks, George > -Original Message- > Of Corinna Vinschen > Sent: Wednesday, December 04, 2013 6:17 AM > Subject: Re: Problem with command substitution in mksh shell after upgrading > to > Cygwin 1.7.26 > > On Dec 4 10:13

Re: Problem with command substitution in mksh shell after upgrading to Cygwin 1.7.26

2013-12-04 Thread Corinna Vinschen
On Dec 4 10:13, Corinna Vinschen wrote: > On Dec 4 03:22, PRIKHODKO, GEORGE wrote: > > Hi, > > > > After upgrading to Cygwin to 1.7.26 the commands: > > > > print $(getIP) > > print $(ipconfig | grep "IPv4 Address" | sort | head -1 | cut -d ":" -f 2 \ > > | sed -e "s/ *\\([0-9.]*\\).*/\\1/"

Re: Problem with command substitution in mksh shell after upgrading to Cygwin 1.7.26

2013-12-04 Thread Corinna Vinschen
On Dec 4 03:22, PRIKHODKO, GEORGE wrote: > Hi, > > After upgrading to Cygwin to 1.7.26 the commands: > > print $(getIP) > print $(ipconfig | grep "IPv4 Address" | sort | head -1 | cut -d ":" -f 2 \ > | sed -e "s/ *\\([0-9.]*\\).*/\\1/") > > in the following script > > #!/usr/bin/ksh > > c

Re: 1.5.5-1 command substitution hangs (0% cpu) on XP

2003-11-19 Thread Antoine Labour
tress-tests command substitution : #!/bin/bash i=0 while true do A=$(basename /bin/sh) i=$(($i+1)) echo $i; done - I run it, and after some iterations (I got 5 once, more than 500 another time) it hangs. Once it crashed (segv). When it hangs, there are two running bash processes

Re: 1.5.5-1 command substitution hangs (0% cpu) on XP

2003-11-14 Thread Geoffrey Ruscoe
> -Original Message- > From: Geoffrey Ruscoe [mailto:[EMAIL PROTECTED] > Sent: Thursday, November 13, 2003 2:03 PM > To: '[EMAIL PROTECTED]' > Subject: RE: 1.5.5-1 command substitution hangs (0% cpu) on XP > > > I'm sorry I posted this proble

RE: 1.5.5-1 command substitution hangs (0% cpu) on XP

2003-11-13 Thread Geoffrey Ruscoe
AIL PROTECTED]' > Subject: 1.5.5-1 command substitution hangs (0% cpu) on XP > > > I have seen a number of references to this problem, but none > of the fixes seems to work. I have used cygwin on many > systems and not had this problem. > > Basically any form of co

1.5.5-1 command substitution hangs (0% cpu) on XP

2003-11-12 Thread Geoffrey Ruscoe
I have seen a number of references to this problem, but none of the fixes seems to work. I have used cygwin on many systems and not had this problem. Basically any form of command substitution hangs with 0% cpu usage. Usually after a fresh reboot, the problem will not occur for the first couple

Re: Command substitution

2003-10-06 Thread Axel Grobe
Sorry. But it's not the path. This doesn't work also on a win98 system: 1|Picture=greta_08.jpg 2|identify.exe $Picture 3|PicWidth=`identify.exe $Picture; ` 4|echo "Picture With: $PicWidth !" 5|echo "That's it." Now identify.exe is available via PATH and the Picture is in my home-dir. Line 2 print

Re: Command substitution

2003-10-05 Thread Lapo Luchini
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Axel Grobe wrote: | # Here is the script: BASE=D:/WebSites/abc-def.de/web | IDENTIFY=C:/Programme/ImageMagick-5.5.7-Q16/identify.exe The time you installed cygwin you knew what'd you want and get with cygwin, don't you? ^_^ In a POSIX environment a pat

Command substitution

2003-10-05 Thread Axel Grobe
I wrote a bash shellscript. It is running fine in the cygwin bash shell an a Windows NT system. Now I have installed cygwin on my Computer at home running Win98se, but I don't get an output from the executed command in a command substition: # Here is the script: BASE=D:/WebSites/abc-def.de/web I