On 27 August 2010 18:20, Adam Borowski <kilob...@angband.pl> wrote: > On Fri, Aug 27, 2010 at 10:09:49AM +0200, posion bit wrote: >> > (/etc/mc/mc.menu) >> > case "$i" in >> > *.tar.gz) D="`basename $i .tar.gz`";; >> >> mmmm In that case, name-spaced filenames should work, because the >> string is a _quoted_ multi-word string. > > i="cat's meow.tar.gz" > > basename: extra operand `.tar.gz' > Try `basename --help' for more information.
When the solution is easy I don't see why we don't just do it. br...@andean:~$ i="cat's meow.tar.gz" br...@andean:~$ echo "`basename "$i" .tar.gz`" cat's meow (yes, the nested quotes don't seem to matter) -- Brian May <br...@microcomaustralia.com.au> -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/aanlktikb9edowrojto8hhbkios6mn6tqsepj9mmoy...@mail.gmail.com