Hello the guy from https://luxferre.top and gopher://hoi.st
has pretty interesting stuff, such as
[ shell specific or other tries to emulate some getchar function ]
Could it be possible to implement a true portable getchar?
On 25.03.2025 10:51, anthk wrote:
Hello the guy from https://luxferre.top and gopher://hoi.st
has pretty interesting stuff, such as
[ shell specific or other tries to emulate some getchar function ]
Could it be possible to implement a true portable getchar?
Those who think that getchar is a useful function may implement that
natively in Awk. (It avoids external dependencies and all the issues
that the posted/quoted code has made obvious.)
On 3/25/25 7:10 AM, Janis Papanagnou wrote:
On 25.03.2025 10:51, anthk wrote:
Hello the guy from https://luxferre.top and gopher://hoi.st
has pretty interesting stuff, such as
[ shell specific or other tries to emulate some getchar function ]
Could it be possible to implement a true portable getchar?
Those who think that getchar is a useful function may implement that
natively in Awk. (It avoids external dependencies and all the issues
that the posted/quoted code has made obvious.)
I know you can iterate over input strings a character at a time in AWK
but I don't think you can read a single character from stdin without
also providing a newline via ENTER, which is perhaps what the OP was
actually wanting to do?
On 3/25/25 7:10 AM, Janis Papanagnou wrote:
On 25.03.2025 10:51, anthk wrote:
Hello the guy from https://luxferre.top and gopher://hoi.st
has pretty interesting stuff, such as
[ shell specific or other tries to emulate some getchar function ]
Could it be possible to implement a true portable getchar?
Those who think that getchar is a useful function may implement that
natively in Awk. (It avoids external dependencies and all the issues
that the posted/quoted code has made obvious.)
I know you can iterate over input strings a character at a time in AWK
but I don't think you can read a single character from stdin without
also providing a newline via ENTER, which is perhaps what the OP was
actually wanting to do?
[...]
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 546 |
Nodes: | 16 (2 / 14) |
Uptime: | 45:56:29 |
Calls: | 10,394 |
Calls today: | 2 |
Files: | 14,066 |
Messages: | 6,417,271 |