On 4/2/23 01:59, cor...@free.fr wrote:
I saw many commands in /bin and /usr/bin are written by perl.
is perl still the first choice for sysadmin on linux?

Thanks.


For sysadmin, I *use* what comes on the platform.  On Debian:

2023-04-02 13:40:08 root@taz ~
# cat /etc/debian_version ; uname -a
11.6
Linux taz 5.10.0-21-amd64 #1 SMP Debian 5.10.162-1 (2023-01-21) x86_64 GNU/Linux

2023-04-02 13:40:17 root@taz ~
# echo $PATH | tr ':' '\n' | perl -MFile::Slurp -ne 'chomp;@e=read_dir($_,prefix=>1); print map "$_\n",@e'|xargs file|perl -pe 's/\S+\s+//'|grep -v 'symbolic link'|perl -pe 's/, dynamically linked.+//'|sort|uniq -c|sort -rn
   1868 ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV)
    356 POSIX shell script, ASCII text executable
    192 Perl script text executable
     40 Python script, ASCII text executable
     36 Bourne-Again shell script, ASCII text executable
     30 setuid ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV)
     20 ELF 64-bit LSB executable, x86-64, version 1 (SYSV)
     16 setgid ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV)
     14 Tcl script, ASCII text executable
     10 ELF 64-bit LSB pie executable, x86-64, version 1 (GNU/Linux)
      8 POSIX shell script, UTF-8 Unicode text executable
      4 Python script, UTF-8 Unicode text executable
      4 POSIX shell script, ASCII text executable, with very long lines
      2 a /usr/bin/env sh script, ASCII text executable
      2 a /bin/mksh script, UTF-8 Unicode text executable
      2 Python script, ISO-8859 text executable
      2 Java source, UTF-8 Unicode text
      2 ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux)
2 Bourne-Again shell script, ASCII text executable, with very long lines


On FreeBSD:

2023-04-02 13:46:50 toor@f3 ~
# freebsd-version -kru
12.4-RELEASE-p1
12.4-RELEASE-p1
12.4-RELEASE-p2

2023-04-02 13:46:57 toor@f3 ~
# echo $PATH | tr ':' '\n' | perl -MFile::Slurp -ne 'chomp;@e=read_dir($_,prefix=>1); print map "$_\n",@e'|xargs file|perl -pe 's/\S+\s+//'|grep -v 'symbolic link'|perl -pe 's/, dynamically linked.+//'|sort|uniq -c|sort -rn
1022 ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD)
  91 POSIX shell script, ASCII text executable
  78 Perl script text executable
  22 setuid ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD)
  20 a /usr/local/bin/perl5.30.3 script, ASCII text executable
14 ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), statically linked, for FreeBSD 12.4, FreeBSD-style, stripped
   7 Python script, ASCII text executable
   6 setgid ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD)
   5 setuid, setgid ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD)
   4 a /usr/bin/env /usr/local/bin/python3.9 script, ASCII text executable
   4 POSIX shell script, Unicode text, UTF-8 text executable
   3 Ruby script, ASCII text
   1 POSIX shell script, ISO-8859 text executable
1 ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), statically linked, for FreeBSD 12.3, FreeBSD-style, with debug_info, not stripped
   1 Bourne-Again shell script, ASCII text executable


I *write' Perl, Bourne, and Make.


David

Reply via email to