Douglas E. Comer
Computer Science Department
Purdue University
West Lafayette, IN 47907
webmaster: W. David Laverell
Companion
Topics
Home
Book
Information
Purpose
of Site
Getting
Started
Students
Faculty
"What's
New"
"Coming
Attractions"
"C Pointers"
Acknowledgements
|
|
HON: Faculty Notes to Chapter 3
Home > Faculty > Chapter Notes > Chapter 3
Chapter 3
Chapter 3 in the second edition
of Hands-On
contains three new experiments which involve
writing scripts.
That raises the question of which shell to use,
and the most important answer seems to be, "Not
bash". Scripting is not my strong suit,
but with help from colleagues, the internet, and students
(Matt Post in particular) I
came up with this solution (using the fortune cookie
experiment for illustration):
#!/bin/sh
|
tpipe() {
|
sleep 3;echo 1; sleep 1; echo 10
|
}
|
tpipe | telnet cookie.update.uu.se 8445 2>/dev/null | sed '/Trying/d;/Connect/d;/Escape/d;/Connection/d;'
|
This site is maintained by W. David Laverell
of the Computer Science Department
at Calvin College. For assistance or corrections,
please contact him at . |
|