Re: OT: bash scripting question -- passing values to ls
On Sun, Jan 04, 2004 at 02:27:11AM -0500, Matt Price wrote:
[...]
} ls < locate charter | grep -i font
} ?
} nothing I try works -- but I can't believe it's impossible! any
} hints?
locate charter | grep -i font | tr '\012' '\000' | xargs -0 ls -ld
xargs is your friend. So is tr. Learn them and know them. All the other
bash tricks (piping to a loop, using backticks, etc.) can give you problems
with spaces and other special characters in the filenames.
} thx,
} matt
--Greg
Reply to: