[PLUG] Tool to identify applications requiring python

Alex Bedard alex at dastyle.net
Mon Apr 17 02:01:27 UTC 2017


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



More information about the PLUG mailing list