Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!icdoc!syma!andy From: andy@syma.sussex.ac.uk (Andy Clews) Newsgroups: comp.unix.questions Subject: Piping into Shell scripts Message-ID: <2283@syma.sussex.ac.uk> Date: 27 Feb 90 16:58:55 GMT Organization: University of Sussex Lines: 16 Is there any way of getting a Shell script (C or Bourne) to recognise whether it is receiving input from a pipe? My script includes something like this: echo "Please enter message text and then enter a CTRL D" cat > foo etc.etc. In some circumstances I might want to pipe text into the script, so I don't want it to echo the prompt message. I have RTFM (hope I haven't missed something). Can anyone help? -- Andy Clews, Computing Service, Univ. of Sussex, Brighton BN1 9QN, England JANET: andy@syma.sussex.ac.uk BITNET: andy%syma.sussex.ac.uk@uk.ac