> ...and arguments be expanded correctly with "$@"
That assumes that your bash is contained within a script, yes? It doesn't work for commands entered directly in a shell?
> ...unless you're using a really ancient version of bash, you shouldn't use backticks for command substitution.
I was -stupidly- unaware that backticks would nest. I always use $() when I want to nest command substitutions.
> "find ." and "find ./" are identical.
Oh, I know. I have the largely unjustifiable habit of always putting a path in a find invocation, as well as always spelling "the current directory" as ./
> > find | xargs
> Of course, this is always a nice option that bypasses the need for bash.
Don't forget -print0 and -0 if you expect to have to handle arguments that contain spaces! ;)
Or a function. (that is, anywhere the $1, $2, ... variables are available, as "$@" (must have the double-quotes!) just copies $1, $2, .. without changing the word splitting.
> as well as always spelling "the current directory" as ./
That's actually a very good habit to be in a lot of other commands. It's unnecessary with find, but it's harmless either way.
Be careful exporting a changed IFS. That will inherit into child commands, which can cause unexpected breakage. A better model is to simply set IFS in the bash script (without export) or even better, as a one-off prefix to a command
It is common to see saving/restoring IFS to protect against bugs elsewhere from a non-standard IFS: If you do this, a trap is a better idea to guarantee the restore happens. Better yet, let bash handle that for you automagically by using a local variable. Also, unless you're using a really ancient version of bash, you shouldn't use backticks for command substitution. Use $() instead. The thing is, you probably don't even need mess with IFS - shell globbing handles a lot of these things for you and arguments be expanded correctly with "$@" > find | xargsOf course, this is always a nice option that bypasses the need for bash.
Minor suggestion: "find ." and "find ./" are identical.