[lug] Shell Scripting Help

Tkil tkil at scrye.com
Tue Feb 14 12:35:46 MST 2006


I'm pretty sure that we talked about various ways around this just a
few weeks ago.  You can check the archives for it.

Offhand, my answers tend to be:

1. try "-print0" and "xargs -0" to see if that fixes the problem;

2. if not, use perl where the rules about quoting are much more sane.

The recent discussion also covered the use of this pattern:

  command-gens-names-with-spaces | while read file
  do
    ... do-stuff-to "$file"
  done

Which might be enough in your situation; I just haven't internalized
that enough to rattle it off with confidence.

t.

p.s. Hm, longer ago than I thought:

     http://archive.lug.boulder.co.us/Week-of-Mon-20051114/031035.html



More information about the LUG mailing list