This file is indexed.

/usr/share/doc/HOWTO/ja-html/Bash-Prog-Intro-HOWTO-9.html is in doc-linux-ja-html 2006.05.25-1.1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
 <META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
 <TITLE>BASH Programming - Introduction HOW-TO: ¥æ¡¼¥¶¥¤¥ó¥¿¡¼¥Õ¥§¥¤¥¹</TITLE>
 <LINK HREF="Bash-Prog-Intro-HOWTO-10.html" REL=next>
 <LINK HREF="Bash-Prog-Intro-HOWTO-8.html" REL=previous>
 <LINK HREF="Bash-Prog-Intro-HOWTO.html#toc9" REL=contents>
</HEAD>
<BODY>
<A HREF="Bash-Prog-Intro-HOWTO-10.html">¼¡¤Î¥Ú¡¼¥¸</A>
<A HREF="Bash-Prog-Intro-HOWTO-8.html">Á°¤Î¥Ú¡¼¥¸</A>
<A HREF="Bash-Prog-Intro-HOWTO.html#toc9">Ìܼ¡¤Ø</A>
<HR>
<H2><A NAME="s9">9. ¥æ¡¼¥¶¥¤¥ó¥¿¡¼¥Õ¥§¥¤¥¹</A>     </H2>

<H2><A NAME="ss9.1">9.1 ´Êñ¤Ê¥á¥Ë¥å¡¼¤òºî¤ë¤¿¤á¤Ë select ¤ò»È¤¦</A>
        </H2>

<P>
<BLOCKQUOTE><CODE>
<PRE>
        #!/bin/bash
        OPTIONS="Hello Quit"
        select opt in $OPTIONS; do
            if [ "$opt" = "Quit" ]; then
              echo done
              exit
            elif [ "$opt" = "Hello" ]; then
              echo Hello World
            else
              clear
              echo bad option
            fi
        done
        
</PRE>
</CODE></BLOCKQUOTE>
 
<P>
<P>¤â¤·¾åµ­¤Î¥¹¥¯¥ê¥×¥È¤ò¼Â¹Ô¤·¤¿¤Ê¤é¡¢¥Æ¥­¥¹¥È¥Ù¡¼¥¹¤Î¥á¥Ë¥å¡¼¤È¤¤¤¦¥×¥í¥°¥é¥Þ
¤Î¤Ò¤È¤Ä¤ÎÌ´¤¬¼Â¸½¤·¤Æ¤¤¤ë¤Î¤¬Ê¬¤«¤ë¤È»×¤¤¤Þ¤¹¡£¤Þ¤¿ <CODE>for</CODE> ¤ÎÀ©¸æ¹½Â¤
¤È»÷¤Æ¤¤¤ë¤³¤È¤Ë¤âµ¤ÉÕ¤¤¤¿¤«¤â¤·¤ì¤Þ¤»¤ó¡£<CODE>$OPTIONS</CODE> ¤ËÂåÆþ¤µ¤ì¤¿¸ì
(word)¤ò¤Ò¤È¤Ä¤º¤Ä¥ë¡¼¥×¤µ¤»¤ëÂå¤ï¤ê¤Ë¡¢¥×¥í¥ó¥×¥È¤ò½ÐÎϤ·¤Æ¤¤¤ë¤È¤¤¤¦°ã¤¤¤¬
¤¢¤ë¤À¤±¤À¤«¤é¤Ç¤¹¡£
<P>
<H2><A NAME="ss9.2">9.2 ¥³¥Þ¥ó¥É¥é¥¤¥ó¤ò»È¤Ã¤Æ¤ß¤ë         </A>
</H2>

<P>
<BLOCKQUOTE><CODE>
<PRE>
        #!/bin/bash        
        if [ -z "$1" ]; then 
            echo usage: $0 directory
            exit
        fi
        SRCD=$1
        TGTD="/var/backups/"
        OF=home-$(date +%Y%m%d).tgz
        tar -cZf $TGTD$OF $SRCD
        
</PRE>
</CODE></BLOCKQUOTE>
<P>
<P>¾åµ­¤Î¥¹¥¯¥ê¥×¥È¤¬²¿¤ò¤¹¤ë¤«¤Ï¡¢¤â¤¦¤ªÊ¬¤«¤ê¤Ç¤·¤ç¤¦¡£ºÇ½é¤Î¾ò·ïÀ©¸æ¤Î¼°¤Ï¡¢
¥×¥í¥°¥é¥à¤¬°ú¿ô <CODE>($1)</CODE>¤ò¼õ¤±¼è¤Ã¤¿¤«¤É¤¦¤«¤òÄ´¤Ù¤ë¤â¤Î¤Ç¤¹¡£¤½¤·¤Æ¡¢
°ú¿ô¤ò¼õ¤±¼è¤é¤Ê¤«¤Ã¤¿¤È¤­¤Ï´Êñ¤Ê»ÈÍÑÊýË¡¤Ë¤Ä¤¤¤Æ¤Î¥á¥Ã¥»¡¼¥¸¤òɽ¼¨¤·¤Æ½ª
λ¤·¤Þ¤¹¡£¥¹¥¯¥ê¥×¥È¤Î»Ä¤ê¤ÎÉôʬ¤Ï¡¢¤³¤Î»þÅÀ¤Ç¤ÏÌÀÎƤÀ¤È»×¤¤¤Þ¤¹¡£
<P>
<P>
<P>
<P>
<HR>
<A HREF="Bash-Prog-Intro-HOWTO-10.html">¼¡¤Î¥Ú¡¼¥¸</A>
<A HREF="Bash-Prog-Intro-HOWTO-8.html">Á°¤Î¥Ú¡¼¥¸</A>
<A HREF="Bash-Prog-Intro-HOWTO.html#toc9">Ìܼ¡¤Ø</A>
</BODY>
</HTML>