Matt Price <[EMAIL PROTECTED]> writes: > here's something that ocmes up a lot for me: > > I use locate to find a bunch of files: > > % locate charter | grep -i font > /usr/share/texmf/fonts/afm/bitstrea/charter > /usr/share/texmf/fonts/tfm/bitstrea/charter > /usr/share/texmf/fonts/type1/bitstrea/charter > /usr/share/texmf/fonts/vf/bitstrea/charter > > then I want to ls -l each of these files...
IMHO, the simplest way to do it is locate charter | grep -i font | xargs ls -l but that will fail if the filenames have spaces or other whitespace in them. The very slow but reliable equivalent would be find / -name charter -path '*charter*' -print0 | xargs -0 ls -l or even find / -name charter -path '*charter*' -ls but that doesn't do the caching that locate does. (Other people have given good suggestions about using backticks to do this as well.) -- David Maze [EMAIL PROTECTED] http://people.debian.org/~dmaze/ "Theoretical politics is interesting. Politicking should be illegal." -- Abra Mitchell -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]