On 3/23/21 4:46 AM, Andreas Schwab wrote: > On Mär 22 2021, Dale R. Worley wrote: > >> Greg Wooledge <g...@wooledge.org> writes: >>> Partly true. seq(1) is a Linux thing, and was never part of any >>> tradition, until Linux people started doing it. >> >> Huh. I started with Ultrix, and then SunOS, but don't remember learning >> seq at a later date. > > According to <https://www.freebsd.org/cgi/man.cgi?query=seq>, seq > appeared in Version 8 AT&T UNIX. > >> I've never tracked down why, but the Perl executable is a lot smaller >> than the Bash executable. > > Is it? > > $ size /usr/bin/perl /bin/bash > text data bss dec hex filename > 2068661 27364 648 2096673 1ffe21 /usr/bin/perl > 1056850 22188 61040 1140078 11656e /bin/bash > > Of course, a lot of perl is part of loadable modules.
How thoroughly do you want to cheat? $ size /usr/bin/perl /bin/bash text data bss dec hex filename 3840 792 16 4648 1228 /usr/bin/perl 923139 22092 60800 1006031 f59cf /bin/bash $ du -sh /usr/bin/perl /bin/bash 16K /usr/bin/perl 932K /bin/bash Gosh, how does the perl interpreter define an entire language core in 16kb??? Pure magic. Naturally, the loadable modules you mention are very significant either way. $ pacman -Qi bash perl Name : bash Version : 5.1.004-1 [...] Installed Size : 8.19 MiB [...] Name : perl Version : 5.32.1-1 [...] Installed Size : 57.63 MiB And, for extras, it turns out most of the size of perl's no-modules interpreter (that ever so tiny 16kb binary) is in $ du -sh /usr/lib/perl5/5.32/core_perl/CORE/libperl.so 3.7M /usr/lib/perl5/5.32/core_perl/CORE/libperl.so $ size /usr/lib/perl5/5.32/core_perl/CORE/libperl.so text data bss dec hex filename 3604395 77020 25352 3706767 388f8f /usr/lib/perl5/5.32/core_perl/CORE/libperl.so Which is indeed much larger than bash (one binary, no libbash.so, whether to count the separate libreadline.so in my vendor configuration is debatable). -- Eli Schwartz Arch Linux Bug Wrangler and Trusted User
OpenPGP_signature
Description: OpenPGP digital signature