| |
comp.unix.programmer |
Am writing a line-based filter a la sed or tr. What I would like it to 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), thanks,
do, however, is if there is no input at start-up, it should present some
usage information and exit.
MyLineFilter: Did not find any text to process. Exiting.
1
but the executable waits for input until it finds EOF.
- Anand