rc-list - mailing list for the rc(1) shell
 help / color / mirror / Atom feed
* Re:  is there any clever way to do 'read' in rc scripts?
@ 1991-09-17  8:26 malte
  0 siblings, 0 replies; 4+ messages in thread
From: malte @ 1991-09-17  8:26 UTC (permalink / raw)
  To: rc

At least under SunOs and Ultrix there is a programm called "line"
which does the job. You'll like to read the man page.

	fn read {
		$1=`{ line }
	}

_______________________________________________________________________________
malte@techfak.uni-bielefeld.de

send mail to:	Universitaet Bielefeld, Technische Fakultaet
		z. Hd. Malte Uhl
		Postfach 8640
		4800 Bielefeld 1



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re:  is there any clever way to do 'read' in rc scripts?
@ 1991-09-16 22:25 Byron Rakitzis
  0 siblings, 0 replies; 4+ messages in thread
From: Byron Rakitzis @ 1991-09-16 22:25 UTC (permalink / raw)
  To: rc

I think that in general you will run into trouble with utilities that
buffer their input. Therefore you'll need to write a C program that
reads 1 character at a time up to a newline, then quits.

Please someone tell me I'm wrong.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re:  is there any clever way to do 'read' in rc scripts?
@ 1991-09-16 22:21 Rich Salz
  0 siblings, 0 replies; 4+ messages in thread
From: Rich Salz @ 1991-09-16 22:21 UTC (permalink / raw)
  To: cks, rc

Hmm, I agree that `{sed 1q} seems to read one too many lines.
This works okay for me, don't know about elsewhere:
	`{head -1}


^ permalink raw reply	[flat|nested] 4+ messages in thread

* is there any clever way to do 'read' in rc scripts?
@ 1991-09-16 21:59 Chris Siebenmann
  0 siblings, 0 replies; 4+ messages in thread
From: Chris Siebenmann @ 1991-09-16 21:59 UTC (permalink / raw)
  To: rc

 I've recently run into a situation where I really, really could use
an rc equivalent of the sh read command in a script, and I can't figure
out how to do this. Any number of methods will work ... if you're getting
input from the keyboard. At least on Ultrix, all of them gobble some or
all of the remaining input if invoked on a pipe or a file.

 Any clever ideas, anyone?

	- cks


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1991-09-17  8:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1991-09-17  8:26 is there any clever way to do 'read' in rc scripts? malte
  -- strict thread matches above, loose matches on Subject: below --
1991-09-16 22:25 Byron Rakitzis
1991-09-16 22:21 Rich Salz
1991-09-16 21:59 Chris Siebenmann

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).