Piped block input to C Shell script

Posted on 1997-07-11
Medium Priority
Last Modified: 2013-12-26
How can output, piped to a C Shell script be handled by the script as block input?
Question by:keyboards
1 Comment
LVL 51

Accepted Solution

ahoffmann earned 400 total points
ID: 1293973
Blocking is not done by the C-shell, but by the underlaying operating system.
The only way (I know) to force a C-shell to do a enless read loop
from stdin is

      set i = `echo $<`
      # do your actions with  $i
      if ("$i" == "EndOfBlock") break

The program writing the output piped into this C-shell must send
a "EndOfBlock" string (any string allowed, must just be uniq to
the rest of the input data).

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
Ready to get certified? Check out some courses that help you prepare for third-party exams.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This video tutorial shows you the steps to go through to set up what I believe to be the best email app on the android platform to read Exchange mail.  Get the app on your phone: The first step is to make sure you have the Samsung Email app on your …

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question