help-bash
[Top][All Lists]
Advanced

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

Re: [Help-bash] Multiple double quoted expansions


From: Chris F.A. Johnson
Subject: Re: [Help-bash] Multiple double quoted expansions
Date: Sun, 1 May 2016 01:44:06 -0400 (EDT)
User-agent: Alpine 2.10 (DEB 1266 2009-07-14)

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";

--
Chris F.A. Johnson, <http://cfajohnson.com>



reply via email to

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