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