Anonymous user
User defined pipe and redirection operators: Difference between revisions
User defined pipe and redirection operators (view source)
Revision as of 12:36, 13 September 2011
, 12 years agorm blank lines
(For bonus Kudos: Implement the shell "&" concept as a dyadic operator in the specific language.) |
(rm blank lines) |
||
Line 12:
* Replicate the below sample shell script, but in the specific language
* Specifically ''do not'' cache the entire stream before the subsequent filter/procedure starts. Pass each record on as soon possible running all filters/procedures concurrently.
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>▼
'''Alternately:''' if the language does not support operator definition then replace with:
Line 19 ⟶ 17:
Note: I estimate this alternative task can be done 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>
'''Sample shell script:''' ''¢ draft - pending a better (more interesting) suggestion ¢''
Line 28:
) | sort | uniq | tee "the_important_scientists.lst" | grep aa
);
echo "Pioneer: $aa"</lang>
'''Input File:'''
* List_of_computer_scientists.lst - cut from wikipedia.
|