Sujet : Re: Command Languages Versus Programming Languages
De : rweikusat (at) *nospam* talktalk.net (Rainer Weikusat)
Groupes : comp.unix.shell comp.unix.programmer comp.lang.miscDate : 11. Oct 2024, 19:37:46
Autres entêtes
Message-ID : <87ttdi5vut.fsf@doppelsaurus.mobileactivedefense.com>
References : 1 2 3 4 5 6 7 8 9 10 11
User-Agent : Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
Muttley@DastartdlyHQ.org writes:
Rainer Weikusat <rweikusat@talktalk.net> boring babbled:
[...]
Eg, this a poor man's implementation of cat:
>
perl -e 'open($fh, $_) and print <$fh> for @ARGV'
>
Meanwhile in awk: { print }
perl -peZ
It's not only shorter than the awk version but it also works. cat
doesn't abort when some of its arguments don't name existin files.