bug-bash
[Top][All Lists]
Advanced

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

Re: Why is command substitution happening?


From: Bill Gradwohl
Subject: Re: Why is command substitution happening?
Date: Tue, 12 Apr 2011 09:15:40 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.15) Gecko/20110307 Fedora/3.1.9-0.39.b3pre.fc14 Lightning/1.0b3pre Thunderbird/3.1.9

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 04/12/2011 08:01 AM, Andreas Schwab wrote:
>
> The paren is a red herring, you need to get rid of the backquote.
>

The backquotes you see in the message were supplied by bash's error
reporting. I don't have any back quotes.

Removing the "|bash" from my script line yields (For example) :

rmdir --ignore-fail-on-non-empty "/snapshot/Music/Etta James/The
Essential Etta James/The Essential Etta James [Disc 1]"
rmdir --ignore-fail-on-non-empty "/snapshot/Music/Etta James/The
Essential Etta James/The Essential Etta James (Disc 2)"
rmdir --ignore-fail-on-non-empty "/snapshot/Music/Etta James/The
Essential Etta James"

I supply the double quotes to surround the path that may contain spaces
and odd characters, but I don't supply any back quotes.

Your comment did make me look at this a bit more however.

The offending statement was several thousand lines into the stream being
parsed by bash. Prior to this occurrence of an open paren there were
other occurrences as shown below, and they didn't raise an error condition.

rmdir --ignore-fail-on-non-empty "/snapshot/Music/Otis Redding/The Dock
of the Bay"
rmdir --ignore-fail-on-non-empty "/snapshot/Music/Otis Redding/The Dock
Of The Bay (The Definitive Collection)"
rmdir --ignore-fail-on-non-empty "/snapshot/Music/Otis Redding/Tell the
Truth"

SO your comment that the paren is a red herring makes sense.

What I did notice were path names that contained single quotes as
follows scattered throughout the stream:

rmdir --ignore-fail-on-non-empty "/snapshot/Music/ZZ Top/ZZ Top - ZZ
Top's First Album -1970"

I also noticed path names containing single backquotes as in:

rmdir --ignore-fail-on-non-empty "/snapshot/Music/Elton John/1999 -
Elton John And Tim Rice`s Aida"

Could this somehow be the cause? An opening single/back quote on one
line (buried within a double quote), and then some lines distant another
single/back quote that acts as the ending quote to the first one?

Doesn't make sense to me but I'm reaching for understanding. I'm trying
to understand why a particular line has an error and not similar lines
before it.

- -- 
Bill Gradwohl
Roatan, Honduras
504 9 899 2652
IM:BillGradwohl@gmail.com (No email please-IM only)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAk2kbJwACgkQ7Orvev+eC8oBbACgtygt4IICo0ZBETSlvRTGldv1
Hw8AoJpZe4fYRSEV3wj86AGhh7wL7Kpd
=E3tT
-----END PGP SIGNATURE-----



reply via email to

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