On 09Dec2008 18:24, RGH <[EMAIL PROTECTED]> wrote:
> Since we were talking here about this last week, I thought I'd mention this:
>     
> http://www.cyberciti.biz/tips/handling-filenames-with-spaces-in-bash.html
> Most of the ideas there are ones that got mentioned here, but there is a  
> new one.

If you mean this:

  # a backspace/newline pair without resorting to cumbersome echo
  IFS='^H
  '
  FILES=foo/*
  for f in $FILES
  do

That's awful!

This:

  for f in foo/*
  do

is totally reliable and does not need $IFS hacking (which amounts to
"guess a char I might not see in a filename).

And don't get me started on the evils of using $UPPER_CASE variable names
for script local variables. The $UPPER_CASE names ae routines exported
($PATH, $PS1, $MANPATH, etc etc); lower case is where your locals should
go. (Remember, you will never know the full list of exported variables,
and if you reuse one that is already in the environment then you've just
broken it for every subprogram you call.)

Cheers,
-- 
Cameron Simpson <[EMAIL PROTECTED]> DoD#743
http://www.cskk.ezoshosting.com/cs/

Network Planning Constraint Of The Month:
        You can't send bits over a non-existant link.
                - Valdis Kletnieks <[EMAIL PROTECTED]>

-- 
fedora-list mailing list
[email protected]
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

Reply via email to