On 04/16/2017 06:40 PM, David Fleck wrote:
> On Sun, 2017-04-16 at 15:49 -0700, Rich Shepard wrote:
>>     I was wondering if there's a gnu utility that can query installed
>> executables (in /usr/bin, /bin, /usr/local/bin, etc.) for the string
>> 'python.'
> for i in /usr/bin/*; do strings $i | grep python && echo $i >>
> output.txt
>
> Replace /usr/bin/* as needed.
>   
>
I would recommend a variant of that, but using file rather than strings 
(since a python script might have the word python more than once per 
file...):

time for i in /usr/bin/*
     do file $i | grep python && echo $i >> output.txt
done;

--
Alex Bedard
_______________________________________________
PLUG mailing list
[email protected]
http://lists.pdxlinux.org/mailman/listinfo/plug

Reply via email to