Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

help with c-shell input



In an earlier episode, Bob Leigh said:
>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.
>

Thanks Bob!  It workd like a charm.





BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org