From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@cse.psu.edu From: Wladimir Mutel Message-ID: Subject: [9fans] 'rc' question: how to read a line ? Date: Thu, 18 Dec 2003 16:49:04 +0000 Topicbox-Message-UUID: a9d9edbe-eacc-11e9-9e20-41e7f4b1d025 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.