john@dcl-cs.UUCP (John R Nicol) (09/24/85)
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. I opted for a solution based on pseudo-terminals, i.e. a filter process for input, one for output and a shell all connected to a pseudo terminal. The major problem encoun- tered is that the input filter must know when it can build up lines and when it must pass on RAW data. It must then know if the lines are input to the shell or to some tool, in order to isolate genuine commands. Has anyone attempted anything similar? Any ideas on how to solve this problem? I would be VERY GRATEFUL to hear from anyone who can help. Thanks in advance! -- UUCP: ...!seismo!mcvax!ukc!dcl-cs!john DARPA: john%lancs.comp@ucl-cs | Post: University of Lancaster, JANET: john@uk.ac.lancs.comp | Department of Computing, Phone: +44 524 65201 Ext. 4146 | Bailrigg, Lancaster, UK. Project:COSMOS Distributed Operating System | LA1 4YR