Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Piped block input to C Shell script

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

Accepted Solution

by:
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

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

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).
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
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 shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…

926 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