Solved

Piped block input to C Shell script

Posted on 1997-07-11
1
247 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 100 total points
Comment Utility
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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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 tutorial demonstrates a quick way of adding group price to multiple Magento products.

763 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now