help with c-shell input

Bob Leigh bobleigh at twomeeps.com
Sun Sep 26 10:05:01 EDT 2004


John J Boland <jjb at world.std.com> wrote:
> right now, i'm stuck trying to read from the keyboard!
> using, bourne or korn, i'd just use 'read variable'. however, when i
> try the same line in c-shell, i get "undefined variable"!
> any ideas how to get the user to enter their selection?

Try this:

	set variable=$<

Here's an extract from the csh(1) manpage:

          $<      Substitutes a line from the standard input, with no further
                  interpretation.  It can be used to read from the keyboard
                  in a shell script.

-- 
Bob Leigh	bobleigh at twomeeps.com
  "It is the loss of that long memory which deprives our people of
   that connective flow of thoughts and events that clarifies our vision,
   not of where we are going, but where we want to go."  -- Utah Phillips



More information about the Discuss mailing list