Warning: preg_match(): Delimiter must not be alphanumeric, backslash, or NUL in /var/www/html/activities/books/networking/labbook/fac/fac3.php on line 2

Warning: preg_match(): Delimiter must not be alphanumeric, backslash, or NUL in /var/www/html/activities/books/networking/labbook/fac/fac3.php on line 2

Warning: preg_match(): Delimiter must not be alphanumeric, backslash, or NUL in /var/www/html/activities/books/networking/labbook/fac/fac3.php on line 3

Warning: preg_match(): Delimiter must not be alphanumeric, backslash, or NUL in /var/www/html/activities/books/networking/labbook/fac/fac3.php on line 4

Warning: preg_match(): Delimiter must not be alphanumeric, backslash, or NUL in /var/www/html/activities/books/networking/labbook/fac/fac3.php on line 5

Warning: preg_match(): Delimiter must not be alphanumeric, backslash, or NUL in /var/www/html/activities/books/networking/labbook/fac/fac3.php on line 8

 

 


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 Student Notes
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 lave@calvin.edu.