Sujet : Re: getchar implementation without GNUishms
De : gazelle (at) *nospam* shell.xmission.com (Kenny McCormack)
Groupes : comp.lang.awkDate : 26. Mar 2025, 06:48:06
Autres entêtes
Organisation : The official candy of the new Millennium
Message-ID : <vs04em$nf97$1@news.xmission.com>
References : 1 2 3 4
User-Agent : trn 4.0-test77 (Sep 1, 2010)
In article <
vs0258$ncqh$1@news.xmission.com>,
Kenny McCormack <
gazelle@shell.xmission.com> wrote:
...
This also works for me:
--- Cut Here ---
BEGIN {
cmd = "exec bash -c 'while :;do read -rsn1 < /dev/tty;echo $REPLY;done'"
while (cmd |& getline)
print "Result:",$0
}
--- Cut Here ---
-- The randomly chosen signature file that would have appeared here is more than 4lines long. As such, it violates one or more Usenet RFCs. In order to remainin compliance with said RFCs, the actual sig can be found at the following URL: http://user.xmission.com/~gazelle/Sigs/Voltaire