|
From: | B. S. |
Subject: | Re: [Help-bash] bash 4.3 escaping : (breaking script), unlike 4.2. Huh? |
Date: | Sun, 23 Oct 2016 19:49:57 -0400 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0 |
tar has indeed changed between the two, e.g. 14.04 understands --acls --xattr --selinux
Kubuntu 12.04, GNU bash, version 4.2.25(1)-release (x86_64-pc-linux-gnu), tar (GNU tar) 1.26
Kubuntu 14.04, GNU bash, version 4.3.11(1)-release (i686-pc-linux-gnu), tar (GNU tar) 1.27.1
FWIW ... uname -a ; lsb_release -a 12.04:Linux testwmedia 3.13.0-93-generic #140~precise1-Ubuntu SMP Tue Jul 19 19:55:11 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
LSB Version: core-2.0-amd64:core-2.0-noarch:core-3.0-amd64:core-3.0-noarch:core-3.1-amd64:core-3.1-noarch:core-3.2-amd64:core-3.2-noarch:core-4.0-amd64:core-4.0-noarch
Distributor ID: Ubuntu Description: Ubuntu 12.04.5 LTS Release: 12.04 Codename: precise 14.04:Linux teststore5 3.13.0-96-generic #143-Ubuntu SMP Mon Aug 29 20:15:47 UTC 2016 i686 i686 i686 GNU/Linux
LSB Version: core-2.0-ia32:core-2.0-noarch:core-3.0-ia32:core-3.0-noarch:core-3.1-ia32:core-3.1-noarch:core-3.2-ia32:core-3.2-noarch:core-4.0-ia32:core-4.0-noarch:core-4.1-ia32:core-4.1-noarch:cxx-3.0-ia32:cxx-3.0-noarch:cxx-3.1-ia32:cxx-3.1-noarch:cxx-3.2-ia32:cxx-3.2-noarch:cxx-4.0-ia32:cxx-4.0-noarch:cxx-4.1-ia32:cxx-4.1-noarch:desktop-3.1-ia32:desktop-3.1-noarch:desktop-3.2-ia32:desktop-3.2-noarch:desktop-4.0-ia32:desktop-4.0-noarch:desktop-4.1-ia32:desktop-4.1-noarch:graphics-2.0-ia32:graphics-2.0-noarch:graphics-3.0-ia32:graphics-3.0-noarch:graphics-3.1-ia32:graphics-3.1-noarch:graphics-3.2-ia32:graphics-3.2-noarch:graphics-4.0-ia32:graphics-4.0-noarch:graphics-4.1-ia32:graphics-4.1-noarch:languages-3.2-ia32:languages-3.2-noarch:languages-4.0-ia32:languages-4.0-noarch:languages-4.1-ia32:languages-4.1-noarch:multimedia-3.2-ia32:multimedia-3.2-noarch:multimedia-4.0-ia32:multimedia-4.0-noarch:multimedia-4.1-ia32:multimedia-4.1-noarch:printing-3.2-ia32:printing-3.2-noarch:printing-4.0-ia32:print
ing-4.0-noarch:printing-4.1-ia32:printing-4.1-noarch:qt4-3.1-ia32:qt4-3.1-noarch:security-4.0-ia32:security-4.0-noarch:security-4.1-ia32:security-4.1-noarch Distributor ID: Ubuntu Description: Ubuntu 14.04.5 LTS Release: 14.04 Codename: trusty On 10/23/2016 05:11 PM, Andy Chu wrote:
What's tar --version on both systems? This smells like a tar issue and not a bash issue. Tar's error message looks like it's treating the entire string as a command to execute, not a shell string. In other words, it looks like it's calling exec*() (no shell) and not system() (uses /bin/sh). Andy On Sun, Oct 23, 2016 at 12:39 PM, B. S. <address@hidden> wrote:In kubuntu 12.04, bash (4.2.25) line of: tmpstr="{ md5sum - ; echo \$TAR_REALNAME ; } | sed -e ':a;N;\$!ba;s/-\\n//g'" when used in a tar --to-command call: tar blah --to-command="${tmpstr}" --extract worked fine. In kubuntu 14.04, bash (4.3.11), same code, causes tar (--to-command subshell) to report: tar: { md5sum - ; echo $TAR_REALNAME ; } | sed -e '\:a;N;$!ba;s/-\\n//g': Cannot exec: No such file or directory tar: Error is not recoverable: exiting now i.e. the colon is now getting escaped. - what has changed 4.2 to 4.3 (i.e. what magic search term will take me directly to an explanation of what's going on / changed)? - how do I stop the : from being escaped? TIA!
[Prev in Thread] | Current Thread | [Next in Thread] |