The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Newsgroups: comp.unix.programmer
From: gordonb.cf...@burditt.org (Gordon Burditt)
Date: Sat, 04 Jul 2009 02:32:49 -0500
Local: Sat 4 July 2009 08:32
Subject: Re: Writing a line based filter that exits when no input
>Am writing a line-based filter a la sed or tr. What I would like it to What is *NO INPUT*? If stdin is closed (redirection <&- or 0<&- >do, however, is if there is no input at start-up, it should present some >usage information and exit. ), you'll get an error when you try to read from stdin. It is unlikely that anyone will do this. Chances are most commands will not react cleanly to being invoked with stdin closed if they expect to use it. Reading from the user's terminal is not "no input". If you want >E.g.,
>$ MyLineFilter < TextFile # OK >$ Some Command | MyLineFilter # OK >$ MyLineFilter >$ echo $? >$ MyLineFilter Command Line Args # Undecided what to do here ... >Would appreciate some ideas on how to implement this. >Currently, am writing the usage information to stderr (unconditionally), You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||