POV-Ray : Newsgroups : povray.off-topic : Where is the world going? : Re: Where is the world going? Server Time
29 Jul 2024 08:14:47 EDT (-0400)
  Re: Where is the world going?  
From: Warp
Date: 3 Sep 2013 15:19:38
Message: <52263649@news.povray.org>
Jim Henderson <nos### [at] nospamcom> wrote:
> > For what it's worth, most *nix shells and comand line utilities also
> > have a conniption when it comes to spaces in file names.

> Not if you properly escape them or put the filename in quotes.  That's a 
> pretty standard practice.

When specifying file names on the command line using wildcards, the shell
will pass file names with spaces in them to the program appropriately.

In shell scripts, however, special care has to be taken to not make
command-line parameters (or even files retrieved using eg. file name
patterns) with spaces in them break the script.

A very common mistake is to write $* in the script to get all the command
line parameters. This will break it for parameters with spaces in them,
as the command where that expansion is used will see them as separate
parameters. The syntax for doing that properly is "$@".

You see this mistake being made all the time, even within high-profile
programs and tools that should know better.

-- 
                                                          - Warp


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.