bug-bash
[Top][All Lists]
Advanced

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

Why is command substitution happening?


From: Bill Gradwohl
Subject: Why is command substitution happening?
Date: Mon, 11 Apr 2011 12:23:15 -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

I have a tiny script to prune empty directories from a structure. The
essential line is as follows:

tree --noreport -dfi "${1}" | tac | sed 's/"/\\"/g;s/^/rmdir
- --ignore-fail-on-non-empty "/;s/$/"/'|bash


Running it recently produced :
bash: command substitution: line 2201: syntax error near unexpected
token `('
bash: command substitution: line 2201: `rmdir --ignore-fail-on-non-empty
"/snapshot/Music/Etta James/The Essential Etta James/The Essential Etta
James (Disc 2)"'

I'm trying to understand why command substitution is happening at all,
since the opening paren isn't preceded by a dollar sign.


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

iEYEARECAAYFAk2jRxMACgkQ7Orvev+eC8okUwCfYe9xnBSTQf2/ieWNNJ15rrg2
3poAoJXOswmlkqKHQb0VF3Vpz5pqBPN9
=o8PF
-----END PGP SIGNATURE-----



reply via email to

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