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

Re: bash and variable holding directories with spaces

On Wed, Dec 07, 2005 at 01:18:12AM +0100, Almut Behrens wrote:
> On Tue, Dec 06, 2005 at 04:07:02PM -0500, Andrew Cady wrote:
> > Seriously though, shell scripting sucks.  Perl!  It's on every
> > debian system with debconf.
> I absolutely agree with you here.  I love perl myself.  OTOH, I'm
> trying to resist the urge to go telling people to use it as the
> "golden hammer" for each and every scripting problem they come up
> with.  I'm kinda feeling that might be perceived as inappropriate --


It probably is.  However, I cannot bear to post shell script snippets
without recommending perl, almost as a matter of principle.  I cannot
have my snippet be misinterpreted as an endorsement of shell scripting!

> All I was trying to point out is that it's good to remember there's
> "eval" when you find yourself wondering why some scripted shell command
> containing interpolated variables doesn't behave as expected, i.e. as
> if you had typed the same (expanded) string of letters on the
> interactive commandline.  That's all.

Right.  My assumption was/is that the original poster is somewhat
unfamiliar with shell scripting and probably unaware of some of the

Reply to: