[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature request for "find" -- text and binary files
From: |
Padraig Brady |
Subject: |
feature request for "find" -- text and binary files |
Date: |
Wed, 20 Jun 2001 15:32:31 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux 2.4.0-ac4 i686; en-US; rv:0.9.1) Gecko/20010607 |
This logic should not be in find and is already in file,
try something along the lines of:
find -print0 |
xargs -r0 file |
grep "text$" | #file always outputs text as last word for text files
cut -f1 -d:
Might be appropriate to put this in a script called findtext ?
so then you could do:
findtext |
tr '\n' '\0' | #needed to support files with spaces in name
xargs -0 grep "search string"
Padraig.