[sf-lug] bash: identifying directories
Asheesh Laroia
asheesh at asheesh.org
Sat Jun 7 15:49:13 PDT 2008
On Sat, 7 Jun 2008, Clyde Jones wrote:
> True - that is the purpose of setting the $IFS at the top of my script
> [1], that makes bash use the carriage return as a field delimiter
> instead of spaces plus carriage returns (you could set it to anything
> you want; tabs, commas, colons etc).
Yup - I think playing with IFS is ugly.
> Your script will miss any .directories (which may or maynot be bad
> thing)
Oops. You can use mpaoli's ingenious globbing to fix that, I suppose.
And then mine has, I think, all the functional benefits of mpaoli's.
That's a little ugly - maybe I'll put that in my .bashrc as a variable...
I'll report back on that.
> So far Michael is the winner in the bash scripting contest.
In a sense, that's no surprise. (-:
I only really sent my email so that everyone would see me wax poetic about
pushd. Yay pushd!
-- Asheesh.
popd
--
Never trust anyone who says money is no object.
More information about the sf-lug
mailing list