Appendix E. Obtaining Sample Programs

Some of the examples in this book are available electronically by both FTP and FTPMAIL. Use FTP if you are directly on the Internet. Use FTPMAIL if you are not on the Internet but can send and receive electronic mail to Internet sites.

FTP

If you have an Internet connection (permanent or dialup), the easiest way to use FTP is via your web browser or an FTP client. To get the examples, point your browser to ftp://ftp.oreilly.com/published/oreilly/nutshell/bash/examples.tar.gz. If you don’t have a web browser, you can use the command-line FTP client included with Windows NT or Windows 95.

A sample session is shown below, with what you should type in boldface.

.ps 8
% ftp ftp.oreilly.com
Connected to ftp.oreilly.com.
220 FTP server (Version 6.21 Tue Mar 10 22:09:55 EST 1992) ready.
Name (ftp.oreilly.com:username): anonymous
331 Guest login OK, send email address as password.
Password: username@hostname 
            (Use your username and host here)
230 Guest login OK, access restrictions apply.
ftp> cd /published/oreilly/nutshell/bash
250 CWD command successful.
ftp> binary (Very important! You must specify binary transfer for compressed files.)
200 Type set to I.
ftp> get examples.tar.gz
200 PORT command successful.
150 Opening BINARY mode data connection for examples.tar.gz (xxxx bytes).
226 Transfer complete. local: exercise remote: exercises
xxxx bytes received in xxx seconds (xxx Kbytes/s)
ftp> quit
221 Goodbye.
%

Get Learning the bash Shell, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.