[Lazarus] How to know programs on Linux written in Pascal?

Michael Ring mail at michael-ring.org
Fri Aug 26 13:16:14 CEST 2016


This will also work, also detects non-lazarus binaries:


grep "FPC " /usr/local/lib/fpc/3.1.1/fpc
Binary file /usr/local/lib/fpc/3.1.1/fpc matches

as a find command:

find /usr/local/bin -type f -exec grep -H "FPC " {} \; 2>/dev/null
Binary file /usr/local/bin/bin2obj matches
...

Binary file /usr/local/bin/unitdiff matches

or this to display the FPC version:

strings /usr/local/lib/fpc/3.1.1/fpc | grep ^"FPC "

FPC 3.1.1 [2016/08/24] for x86_64 - Darwin

as find:

find /usr/local/bin -type f | while read file ; do strings $file | grep 
"^FPC " && echo $file ; done
FPC 3.0.0 [2015/11/14] for i386 - Darwin
/usr/local/bin/bin2obj
FPC 3.0.0 [2015/11/14] for i386 - Darwin
/usr/local/bin/chmcmd
FPC 3.0.0 [2015/11/14] for i386 - Darwin
/usr/local/bin/chmls


Am 26.08.16 um 12:45 schrieb Mark Morgan Lloyd:
> John Landmesser wrote:
>> Debian Linux:
>> I did a search using kfind and searching in executables containing 
>> the String "TForm".
>> The result seems ok, but are there better ways?
>> ... all 62 executables in /usr/bin seems to be part of Lazarus.-- 
>> _______________________________________________Lazarus mailing 
>> listLazarus at lists.lazarus-ide.orghttp://lists.lazarus-ide.org/listinfo/lazarus 
>
>
> Something like
>
> egrep 'Lazarus LCL: .* FPC:' /usr/local/bin/*
>
> Once you've got the names you can use  strings  and pipe it through 
> grep to get the versions used. The whole thing could be automated 
> using  find  but for a small number of programs would be more trouble 
> than it's worth.
>



More information about the Lazarus mailing list