In comp.os.linux.misc Roy Schestowitz <newsgroups@xxxxxxxxxxxxxxx>:
> __/ [Eric] on Saturday 24 December 2005 07:02 \__
>> Hi,
>> I've got some files on my disk that i find are in dos text format. This
>> was unexpected and now I am wondering how many are like that. Is there a
>> tool or thing like find that will tell me what files are in dos format
>> ie something like: find . -type f -format dos -print
>> Thanks
>> Eric
> This will have pitfalls, but regardless:
> find . -type f | grep '.dos' | wc -l
Why should all those files end in .dos? If you wouldn't need
grep, but utilize find's '-name ...'.
Something like this could be a start, might need some more work
left for the OP as exercise:
for f in `find . -type f -print 2>/dev/null`; \
do file $f| grep CRLF ;done | wc -l
--
Michael Heiming (X-PGP-Sig > GPG-Key ID: EDD27B94)
mail: echo zvpunry@xxxxxxxxxx | perl -pe 'y/a-z/n-za-m/'
#bofh excuse 58: high pressure system failure
|
|