Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Piped block input to C Shell script

Posted on 1997-07-11
1
Medium Priority
?
262 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

722 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