help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-bash] bash 4.3 escaping : (breaking script), unlike 4.2. Huh?


From: Andy Chu
Subject: Re: [Help-bash] bash 4.3 escaping : (breaking script), unlike 4.2. Huh?
Date: Sun, 23 Oct 2016 14:11:06 -0700

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!
>
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]