[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] Multiple double quoted expansions
From: |
doark |
Subject: |
Re: [Help-bash] Multiple double quoted expansions |
Date: |
Wed, 25 May 2016 15:15:27 -0400 |
On Sun, 1 May 2016 01:44:06 <address@hidden> wrote:
> On Wed, 27 Apr 2016, David Niklas wrote:
>
> > Hello,
> > Today I typed into my terminal (">" changed to "<"):
> >
> > % for i in *.pcx; do
> > < convert "$i" "$(basename $i .pcx).png";
> > < done
> >
> > This worked well, but all the filenames contained no embedded spaces
> > or anything else. So my question is, how would I redo this to make
> > it handle nastier filenames?
>
> Quote $i:
>
> convert "$i" "$(basename "$i" .pcx).png";
>
^
That works, I thought that placing a double quote here would unquote the
variable.
I can't find the reason in the bash man page, could you explain?
Thanks, David