Xref: utzoo comp.unix.shell:1267 comp.unix.ultrix:5864 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!mit-eddie!media-lab!farmer From: farmer@media-lab.MEDIA.MIT.EDU (Bill Farmer) Newsgroups: comp.unix.shell,comp.unix.ultrix Subject: reading stdin for tcsh script Keywords: script, stdin Message-ID: <4909@media-lab.MEDIA.MIT.EDU> Date: 17 Jan 91 01:57:12 GMT Organization: MIT Media Lab, Cambridge, MA Lines: 27 I am working on an ultrix platform, with tcsh. I want to input from stdin into shell scripts. In bourne this function is 'read'. In c shell, and therefore presumably tc shell, this is effected with the symbol $<, e.g. set superstar = $<. This set command will work fine from the shell itself, so that subsequently when i enter echo $superstar, the string I typed and entered immediatley after the set command is correctly echoed. However when i include this command in a script, errors occur. A simplified example of my desired use is as follows: echo Enter NAME : set title = $< echo Name : $title if this is run like this, as a 3 line script i get the error message 'line 3 newline not expected'. if i variously apply quotes and double quotes in line 2, the program will execute but will not pause to read in the data from stdin, but will assign title the null string. anyone got a handle on what's happening here? if a newline is not expected, what is expected? not ; and not \, attempts using these result in messages saying that they're not expected, either. bill farmer farmer@media-lab.media.mit.edu