Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site brl-tgr.ARPA Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!brl-tgr!tgr!dat@AMES-NAS.ARPA From: dat@AMES-NAS.ARPA (David A. Tristram) Newsgroups: net.unix-wizards Subject: re: shell filter Message-ID: <1839@brl-tgr.ARPA> Date: Tue, 1-Oct-85 17:23:13 EDT Article-I.D.: brl-tgr.1839 Posted: Tue Oct 1 17:23:13 1985 Date-Received: Thu, 3-Oct-85 06:30:46 EDT Sender: news@brl-tgr.ARPA Lines: 22 > I am trying to write a filter for the shell. The idea >is to trap commands and carry out certain actions before >passing a possibly modified command on to the shell. This >seemingly simple task is proving rather difficult. Your idea for using ptty's seems sound. I have done much the same using named pipes on sysV. For the filter, I would try it using m4, or awk if your processing is complicated. There are only a couple cases where you would have to turn off pre-processing to send raw data to a program, such as a hereis (<<) document or quoted strings. In awk, you could implement that by setting a flag when those structures are encountered. Tristram ---------- ------- End of Forwarded Message ---------- Brought to you by Super Global Mega Corp .com