From mboxrd@z Thu Jan 1 00:00:00 1970 From: erik quanstrom Date: Mon, 4 Apr 2011 18:33:05 -0400 To: 9fans@9fans.net Message-ID: In-Reply-To: <86vcythf8h.fsf@cmarib.ramside> References: <86fwpz55nj.fsf@cmarib.ramside> <257867.782e4d7b.wsc0.mx@tumtum.plumbweb.net> <5ddd9deccbea5e8556dfc0c228b63311@ladd.quanstro.net> <86vcythf8h.fsf@cmarib.ramside> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] Making read(1) an rc(1) builtin? Topicbox-Message-UUID: c8e0efe6-ead6-11e9-9d60-3106f5b1d025 > Unfortunately, echon.c doesn't solve the problem either, because it > doesn't output a trailing newline. The crux of the problem is how to > output "-n" on a line by itself, followed by a newline. I don't think if you give me 2^n pennies for the nth way i can think of doing this, i'm gonna be loaded 0. awk 'BEGIN{print "-n"; exit}' 1. echo x -n | sed 's/^ //' 2. echo print "-n\n" | hoc 3. echo '"-n "' | bc 4. unicode 2d 6e | tr -d '\012' ; echo 5. echo '' -n | tr -d ' ' 6. '-n' = 1; whatis -n | sed 's/=.*//' > I'm trying to write an Acme client in rc(1). I'd like to avoid spawning > a new read(1) process every time I make a keystroke or click the mouse. > Using multi-line reads wouldn't help much, because interactivity needs > to be maintained. i don't know what your application is, you don't need to get every mouseclick. see the Mail client. - erik