From: Wladimir Mutel <mwg@fluffy.isd.dp.ua>
To: 9fans@cse.psu.edu
Subject: [9fans] 'rc' question: how to read a line ?
Date: Thu, 18 Dec 2003 16:49:04 +0000 [thread overview]
Message-ID: <slrnbu37ls.2ch.mwg@fluffy.isd.dp.ua> (raw)
Hi,
I use 'rc' shell ported to Unix (Linux/AIX/HPUX).
In most shells (including 'es' shell modeled after 'rc'),
there is 'read' builtin command, to read a line from stdin and assign
its words to one or more variables. But there is no such command in
'rc'. How could I replace it ? 'head -n1' does not work as expected in
most Unixes, as its reads are buffered and often eat more then one
line from stdin. Should I write my own little hack in C ? :>
Thank you in advance for your replies.
next reply other threads:[~2003-12-18 16:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-18 16:49 Wladimir Mutel [this message]
2003-12-18 17:06 ` mirtchov
2003-12-18 17:13 ` mirtchov
2003-12-19 5:04 ` boyd, rounin
2003-12-18 17:11 Richard C Bilson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=slrnbu37ls.2ch.mwg@fluffy.isd.dp.ua \
--to=mwg@fluffy.isd.dp.ua \
--cc=9fans@cse.psu.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).