delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
DomainKey-Signature: | a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:date:from:to:subject:message-id:reply-to | |
:references:mime-version:content-type:in-reply-to; q=dns; s= | |
default; b=rfL9Ox0P2Aa3+CGYSYdelB49QbBUpBfwVDFxSH9YKpoWbxa9COKnQ | |
d4p0E4jIUNtavdXfA3Bwa1vcE/yoX71siEs6RHDkOYzXlEFTgcLQhq4V9v8HWE49 | |
tbaUAP0K1jU5s3pu+a+bQlpE9GpM27O09Ypi3Q0CU1BpN9ZqFKQVxE= | |
DKIM-Signature: | v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:date:from:to:subject:message-id:reply-to | |
:references:mime-version:content-type:in-reply-to; s=default; | |
bh=dO1ewEEEgIzTVziuwsVuv27k25g=; b=WR7KHVLKiNgNtxu0/+fj2wJwUhdi | |
kh89+ArqOdOOO8Eu8srTnzHbo597OR0LivKDEvUA6h1myg6rxe995+4+F8bsljpT | |
Bz3w9kDGqo50OmPnRFsYp4H86EDNStLNNexsel/+9gcINCP3wRTVeGAbbCMCxoed | |
t3XLp2y9FreWNDE= | |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Authentication-Results: | sourceware.org; auth=none |
X-Virus-Found: | No |
X-Spam-SWARE-Status: | No, score=1.5 required=5.0 tests=AWL,BAYES_50,RDNS_NONE autolearn=no version=3.3.2 |
X-HELO: | calimero.vinschen.de |
Date: | Wed, 4 Dec 2013 10:13:48 +0100 |
From: | Corinna Vinschen <corinna-cygwin AT cygwin DOT com> |
To: | cygwin AT cygwin DOT com |
Subject: | Re: Problem with command substitution in mksh shell after upgrading to Cygwin 1.7.26 |
Message-ID: | <20131204091348.GA29444@calimero.vinschen.de> |
Reply-To: | cygwin AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
References: | <397AD605DAD9254D9D2FFE207111E6442B05FF04 AT MOKSCY3MSGUSR9D DOT ITServices DOT sbc DOT com> |
MIME-Version: | 1.0 |
In-Reply-To: | <397AD605DAD9254D9D2FFE207111E6442B05FF04@MOKSCY3MSGUSR9D.ITServices.sbc.com> |
User-Agent: | Mutt/1.5.21 (2010-09-15) |
--W/nzBZO5zC0uMSeA Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Dec 4 03:22, PRIKHODKO, GEORGE wrote: > Hi, >=20 > After upgrading to Cygwin to 1.7.26 the commands: >=20 > print $(getIP) > print $(ipconfig | grep "IPv4 Address" | sort | head -1 | cut -d ":" -f 2= \ > | sed -e "s/ *\\([0-9.]*\\).*/\\1/") >=20 > in the following script >=20 > #!/usr/bin/ksh >=20 > cv=3D$(uname -r) > cv=3D${cv%\(*} > cygcheck -s -v -r > cygcheck_$cv.out >=20 > exec > test_$cv.log 2>&1 > set -xv >=20 > getIP() { > ipconfig | grep "IPv4 Address" | sort | head -1 | cut -d ":" -f 2 \ > | sed -e "s/ *\\([0-9.]*\\).*/\\1/"=20 > } > # > # the following four commands should print IP address 4 times > # > getIP >=20 > print $(getIP) >=20 > ipconfig | grep "IPv4 Address" | sort | head -1 | cut -d ":" -f 2 \ > | sed -e "s/ *\\([0-9.]*\\).*/\\1/" >=20 > print $(ipconfig | grep "IPv4 Address" | sort | head -1 | cut -d ":" -f 2= \ > | sed -e "s/ *\\([0-9.]*\\).*/\\1/") >=20 > exit >=20 > started to produce incorrect results. > test_1.7.26.log shows instead of IP address a whole output of ipconfig is= printed for these lines. >=20 > /usr/bin/ksh, used in the script, is a symbolic link to /usr/bin/mksh >=20 > Please, let me know if you need more info to research the problem. No, thank you. I could track down the culprit of the problem. I don't have a fix yet, but it will be fixed in 1.7.27, which will be due really soon. Thanks, Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --W/nzBZO5zC0uMSeA Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.15 (GNU/Linux) iQIcBAEBAgAGBQJSnvJMAAoJEPU2Bp2uRE+g5N4QAJ70sQuhLSY2gTKqIQb4rusr HXvf5TSZoZOqokgVkrxCv5eYYAGRMKv4m9M6vZMmi+K3plQ9KgYYRLgvo8PaR5iZ vP+GODSkOYpUxmgt1ZYJSjZUAOTPFHFYcP65x/D+CF+YEemgEidTCX7jtuimumes UcHgFq5tdWoSGMaOmwPJASD5KmD/6QQ/drm9BfdcYN0LMa2utMtdAftXB80pDLus kcdnzT01qMZrFinBV+5GYTsf7DrsXmGIuLGBxu1fKtlF4AYqTDy26/w9sXvvD0Br wu0jgKAvuTgysyG7LP37U3xFjXpkLO5aKtM+v5wc4W+uH1epwIHnlhZkFBvcNbeC 2p3oa//6W2kU/BAkoX2MoNjWEExvyuyBx9oPDzTijTQgkF95i6tFuaDXlVb7d4Ub j1HAgBWKyazGQglRsz0O3gCMgzGcV+NhaHBogZVTZ9xZ6V+vtWWKtAIHsdnOs2IG uzsBUEpZLlUO3u0PcRmBv3jmKc7sBUD0Ry5fiw2BnamzVR/AbMNRw+JyqfbFilKa Jog2MoHaVOG3XMgQWhogGmfW/mHqHCrZnJr2B53Us3o+TV4862AhGIvAREsPeU72 64UnzDgaLrdI5BfiMSg5TCDCJs/87KVLEeGT6Xs0akOfLL97L+EeL7uyd6isTRrP pPnZj2L5UVXks36eKlay =B8/a -----END PGP SIGNATURE----- --W/nzBZO5zC0uMSeA--
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |