This commit is contained in:
gferg 2003-08-25 14:48:48 +00:00
parent 526e132369
commit f3977fc7ce
10 changed files with 883 additions and 98 deletions

View File

@ -1,6 +1,86 @@
RELEASE HISTORY CHANGE LOG
------- ------- &
Change log Release History
This file is available on-line at
http://personal.riverusers.com/~thegrendel/Change.log
------------------------------------------------------------------------
Version 2.0
'GOOSEBERRY' release, 08/24/03
Comments:
In view of the cumulative changes in the last several updates, it's
bumped up to a major version. This is now officially a "mature" project.
1) In "Manipulating Strings" section of "Variables Revisited" chapter:
Added negative index substring extraction example (Thanks, Dan
Jacobson).
2) In "Sed appendix":
Changed title of second table, to make it less ambiguous.
3) Changed "Sunsite" address in two examples.
4) Made capitalization of example scripts more consistent.
5) In "Command Substitution" chapter:
Fixed typo in backquotes discussion (Thanks, Jiri Beran).
6) In "Process Substitution" chapter:
Added clarifying comment to SuSE script fragment (Thanks Ulrich Gayer).
7) In "Invoking the script" section of
"Starting Off With a Sha-Bang" chapter:
Corrected typo in discussion
(" . . . not recommended is using sh <scriptname . . . ")
(Thanks, Norman Megill.)
8) In "Quoting" chapter:
Corrected typo in final example ("foor" --> "foo").
(Thanks, Norman Megill.)
Noted that 'echo "\" invokes secondary prompt.
9) In "Here Document" chapter:
Shuffled the order of a couple of examples.
Added warning about closing 'limit string' starting in first character
position on its line, with in-line example. (Also added a mention in
"Gotchas" chapter.
Added "script-generate.sh" example of generating program code
by disabling parameter substitution within the body of a 'here document.'
(Thanks, Albert Reiner, for the idea.)
10) In "Miscellaneous" subsection of "System and Administrative Commands"
chapter:
Added listing for "dialog" toolsets.
11) In "Assorted Tips" section of "Miscellany" chapter:
Added discussion of "dialog" toolsets, with "dialog.sh" example.
12) In "Copyright" chapter:
Updated notices.
13) Added "Reference Cards" appendix.
Thank you, Aurelio Marinho Jargas, for giving me the inspiration.
14) In "Bibliography" section:
Added LINUX JOURNAL article, "Scripting for X Productivity" listing.
Added Jargas' entry for "Regular Expression wizard."
15) In "Loop Control" section of "Loops and Branches" chapter:
Embellished "symlinks.sh" example with Jean Helou's alternative
method.
16) Typo fixes supplied by Edward Scholtz (thanks!):
"Special Variable Types" section of "Introduction to Variables" chapter
"fairly simply way" --> "fairly simple way"
"Quoting" chapter
"advisable in enclose it" --> "advisable to enclose it"
17) Corrected several minor typos in the text and script examples.
Version 1.9 [Cleanups & revisions] Version 1.9 [Cleanups & revisions]
@ -74,7 +154,7 @@ Version 1.8 [Cleanups & revisions]
4) In "blot-out.sh" script, updated the Peter Gutmann URL. 4) In "blot-out.sh" script, updated the Peter Gutmann URL.
5) In "Miscellaneous" subsection of "System and Administrative Commands" 5) In "Miscellaneous" subsection of "System and Administrative Commands"
chapter" chapter:
Added "watch" command. Added "watch" command.
6) In the introduction, in reason not to use shell scripts, 6) In the introduction, in reason not to use shell scripts,

File diff suppressed because it is too large Load Diff

View File

@ -28,7 +28,7 @@ Password=`cruft &lt;$pword` # Decrypt password.
# Uses the author's own "cruft" file encryption package, # Uses the author's own "cruft" file encryption package,
#+ based on the classic "onetime pad" algorithm, #+ based on the classic "onetime pad" algorithm,
#+ and obtainable from: #+ and obtainable from:
#+ Primary-site: ftp://metalab.unc.edu /pub/Linux/utils/file #+ Primary-site: ftp://ibiblio.org/pub/Linux/utils/file
#+ cruft-0.2.tar.gz [16k] #+ cruft-0.2.tar.gz [16k]

View File

@ -2,13 +2,14 @@
# erase.sh: Using "stty" to set an erase character when reading input. # erase.sh: Using "stty" to set an erase character when reading input.
echo -n "What is your name? " echo -n "What is your name? "
read name # Try to erase characters of input. read name # Try to backspace
# Won't work. #+ to erase characters of input.
# Won't work.
echo "Your name is $name." echo "Your name is $name."
stty erase '#' # Set "hashmark" (#) as erase character. stty erase '#' # Set "hashmark" (#) as erase character.
echo -n "What is your name? " echo -n "What is your name? "
read name # Use # to erase last character typed. read name # Use # to erase last character typed.
echo "Your name is $name." echo "Your name is $name."
exit 0 exit 0

View File

@ -2,7 +2,7 @@
# upload.sh # upload.sh
# Upload file pair (Filename.lsm, Filename.tar.gz) # Upload file pair (Filename.lsm, Filename.tar.gz)
# to incoming directory at Sunsite (metalab.unc.edu). # to incoming directory at Sunsite (ibiblio.org).
E_ARGERROR=65 E_ARGERROR=65
@ -15,7 +15,7 @@ fi
Filename=`basename $1` # Strips pathname out of file name. Filename=`basename $1` # Strips pathname out of file name.
Server="metalab.unc.edu" Server="ibiblio.org"
Directory="/incoming/Linux" Directory="/incoming/Linux"
# These need not be hard-coded into script, # These need not be hard-coded into script,
# but may instead be changed to command line argument. # but may instead be changed to command line argument.

View File

@ -8,5 +8,5 @@ a=39
b=36 b=36
exit 0 exit 0
# Note that commenting out the 'exit' command makes no difference, # Note that commenting out the 'exit' command makes no difference,
# since the script exits in any case after running out of commands. #+ since the script exits in any case after running out of commands.

View File

@ -15,9 +15,9 @@ fi
groff -Tascii -man $1 | less groff -Tascii -man $1 | less
# From the man page for groff. # From the man page for groff.
# If the man page includes tables and/or equations, # If the man page includes tables and/or equations,
# then the above code will barf. #+ then the above code will barf.
# The following line can handle such cases. # The following line can handle such cases.
# #
# gtbl < "$1" | geqn -Tlatin1 | groff -Tlatin1 -mtty-char -man # gtbl < "$1" | geqn -Tlatin1 | groff -Tlatin1 -mtty-char -man
# #

View File

@ -33,7 +33,7 @@ John Doe 1555 Main St., Baltimore, MD 21228 (410) 222-3333
Mary Moe 9899 Jones Blvd., Warren, NH 03787 (603) 898-3232 Mary Moe 9899 Jones Blvd., Warren, NH 03787 (603) 898-3232
Richard Roe 856 E. 7th St., New York, NY 10009 (212) 333-4567 Richard Roe 856 E. 7th St., New York, NY 10009 (212) 333-4567
Sam Roe 956 E. 8th St., New York, NY 10009 (212) 444-5678 Sam Roe 956 E. 8th St., New York, NY 10009 (212) 444-5678
Zoe Zenobia 4481 N. Baker St., San Franciso, SF 94338 (415) 501-1631 Zoe Zenobia 4481 N. Baker St., San Francisco, SF 94338 (415) 501-1631
# ------------------------------------------------------------------------ # ------------------------------------------------------------------------
$bash pb.sh Roe $bash pb.sh Roe

View File

@ -1,5 +1,5 @@
#!/bin/bash #!/bin/bash
# poem.sh # poem.sh: Pretty-prints one of the author's favorite poems.
# Lines of the poem (single stanza). # Lines of the poem (single stanza).
Line[1]="I do not know which to prefer," Line[1]="I do not know which to prefer,"
@ -11,6 +11,7 @@ Line[5]="Or just after."
# Attribution. # Attribution.
Attrib[1]=" Wallace Stevens" Attrib[1]=" Wallace Stevens"
Attrib[2]="\"Thirteen Ways of Looking at a Blackbird\"" Attrib[2]="\"Thirteen Ways of Looking at a Blackbird\""
# Above poem is in the Public Domain (copyright expired).
for index in 1 2 3 4 5 # Five lines. for index in 1 2 3 4 5 # Five lines.
do do

View File

@ -30,3 +30,16 @@ done | sort # Otherwise file list is unsorted.
# Even this will only pick up the first field of each argument. # Even this will only pick up the first field of each argument.
exit 0 exit 0
# Jean Helou proposes the following alternative:
echo "symbolic links in directory \"$directory\""
# Backup of the current IFS. One can never be too cautious.
OLDIFS=$IFS
IFS=:
for file in $(find $directory -type l -printf "%p$IFS")
do # ^^^^^^^^^^^^^^^^
echo "$file"
done|sort