User defined pipe and redirection operators: Difference between revisions

Content added Content deleted
(rm blank lines)
(I estimate this alternative task can be done '''without''' using co-routines in GNU C.)
Line 16: Line 16:
* define the procedures: input(cmd,stream), pipe(stream,cmd), output(stream, stream), whereis(array), append(stream)
* define the procedures: input(cmd,stream), pipe(stream,cmd), output(stream, stream), whereis(array), append(stream)


Note: I estimate this alternative task can be done using [http://www.chiark.greenend.org.uk/~sgtatham/coroutines.html Coroutines] in GNU C.
Note: I estimate this alternative task can be done '''without''' using [http://www.chiark.greenend.org.uk/~sgtatham/coroutines.html Coroutines] in GNU C.


For bonus Kudos: Implement the shell "&" concept as a dyadic operator in the specific language. e.g.: <lang sh>( head x & tail x & wait ) | grep test</lang>
For bonus Kudos: Implement the shell "&" concept as a dyadic operator in the specific language. e.g.: <lang sh>( head x & tail x & wait ) | grep test</lang>