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

251 lines
3.1 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML
><HEAD
><TITLE
>Functions</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_10_05.html"><LINK
REL="NEXT"
TITLE="Introduction"
HREF="sect_11_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_10_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_11_01.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="chapter"
><H1
><A
NAME="chap_11"
></A
>Chapter 11. Functions</H1
><DIV
CLASS="TOC"
><DL
><DT
><B
>Table of Contents</B
></DT
><DT
>11.1. <A
HREF="sect_11_01.html"
>Introduction</A
></DT
><DD
><DL
><DT
>11.1.1. <A
HREF="sect_11_01.html#sect_11_01_01"
>What are functions?</A
></DT
><DT
>11.1.2. <A
HREF="sect_11_01.html#sect_11_01_02"
>Function syntax</A
></DT
><DT
>11.1.3. <A
HREF="sect_11_01.html#sect_11_01_03"
>Positional parameters in functions</A
></DT
><DT
>11.1.4. <A
HREF="sect_11_01.html#sect_11_01_04"
>Displaying functions</A
></DT
></DL
></DD
><DT
>11.2. <A
HREF="sect_11_02.html"
>Examples of functions in scripts</A
></DT
><DD
><DL
><DT
>11.2.1. <A
HREF="sect_11_02.html#sect_11_02_01"
>Recycling</A
></DT
><DT
>11.2.2. <A
HREF="sect_11_02.html#sect_11_02_02"
>Setting the path</A
></DT
><DT
>11.2.3. <A
HREF="sect_11_02.html#sect_11_02_03"
>Remote backups</A
></DT
></DL
></DD
><DT
>11.3. <A
HREF="sect_11_03.html"
>Summary</A
></DT
><DT
>11.4. <A
HREF="sect_11_04.html"
>Exercises</A
></DT
></DL
></DIV
><BLOCKQUOTE
CLASS="ABSTRACT"
><DIV
CLASS="abstract"
><A
NAME="AEN6815"
></A
><P
></P
><P
>In this chapter, we will discuss</P
><P
>&#13;
<P
></P
><UL
><LI
><P
>What functions are</P
></LI
><LI
><P
>Creation and displaying of functions from the command line</P
></LI
><LI
><P
>Functions in scripts</P
></LI
><LI
><P
>Passing arguments to functions</P
></LI
><LI
><P
>When to use functions</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_10_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_11_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"
>Introduction</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>