Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2016-08

How to know programs on Linux written in Pascal?

3 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

John Landmesser

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.

Reply by email

Mark Morgan Lloyd
to John Landmesser
John Landmesser wrote 7 lines
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 ://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]

Reply by email

Michael Ring
to Mark Morgan Lloyd

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

Mark Morgan Lloyd wrote 19 lines
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 > ://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.

Reply by email