collect first field of two lines of output onto a single line

6 views
Skip to first unread message

Rainer Weikusat

unread,
Mar 23, 2022, 2:40:10 PMMar 23
to
Another nice Perl-oneliner:

perl -pe 's/\s.*//,$x++||y/\n/ /'

(Input for this is something like { wc -c file; sha256sum file; }, used
for building index lines for a Debian repository Release file)

Reply all
Reply to author
Forward
0 new messages