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

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

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

John Landmesser-3
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 list
[hidden email]
http://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

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

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
> [hidden email]://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.

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]
--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

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

Michael Ring
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
>> [hidden email]://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.
>

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus-ide.org/listinfo/lazarus