old-www/LDP/Bash-Beginners-Guide/html/chap_08.html

241 lines
3.1 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML
><HEAD
><TITLE
>Writing interactive scripts</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="Bash Guide for Beginners"
HREF="index.html"><LINK
REL="PREVIOUS"
TITLE="Exercises"
HREF="sect_07_05.html"><LINK
REL="NEXT"
TITLE="Displaying user messages"
HREF="sect_08_01.html"></HEAD
><BODY
CLASS="chapter"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Bash Guide for Beginners</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="sect_07_05.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="sect_08_01.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="chapter"
><H1
><A
NAME="chap_08"
></A
>Chapter 8. Writing interactive scripts</H1
><DIV
CLASS="TOC"
><DL
><DT
><B
>Table of Contents</B
></DT
><DT
>8.1. <A
HREF="sect_08_01.html"
>Displaying user messages</A
></DT
><DD
><DL
><DT
>8.1.1. <A
HREF="sect_08_01.html#sect_08_01_01"
>Interactive or not?</A
></DT
><DT
>8.1.2. <A
HREF="sect_08_01.html#sect_08_01_02"
>Using the echo built-in command</A
></DT
></DL
></DD
><DT
>8.2. <A
HREF="sect_08_02.html"
>Catching user input</A
></DT
><DD
><DL
><DT
>8.2.1. <A
HREF="sect_08_02.html#sect_08_02_01"
>Using the read built-in command</A
></DT
><DT
>8.2.2. <A
HREF="sect_08_02.html#sect_08_02_02"
>Prompting for user input</A
></DT
><DT
>8.2.3. <A
HREF="sect_08_02.html#sect_08_02_03"
>Redirection and file descriptors</A
></DT
><DT
>8.2.4. <A
HREF="sect_08_02.html#sect_08_02_04"
>File input and output</A
></DT
></DL
></DD
><DT
>8.3. <A
HREF="sect_08_03.html"
>Summary</A
></DT
><DT
>8.4. <A
HREF="sect_08_04.html"
>Exercises</A
></DT
></DL
></DIV
><BLOCKQUOTE
CLASS="ABSTRACT"
><DIV
CLASS="abstract"
><A
NAME="AEN5307"
></A
><P
></P
><P
>In this chapter we will discuss how to interact with the users of our scripts:</P
><P
>&#13;<P
></P
><UL
><LI
><P
>Printing user friendly messages and explanations</P
></LI
><LI
><P
>Catching user input</P
></LI
><LI
><P
>Prompting for user input</P
></LI
><LI
><P
>Using the file descriptors to read from and write to multiple files</P
></LI
></UL
>
</P
><P
></P
></DIV
></BLOCKQUOTE
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="sect_07_05.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="sect_08_01.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Exercises</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
>&nbsp;</TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Displaying user messages</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>