Jim: I downloaded the latest alpha of sh-utils, 2.0i.
Here are my corrections for sh-utils.texi. There are a number of
FIXMEs here where I didn't know how to rewrite the sentence.
Note that the distribution that I downloaded had the same problems
with getdate.texi that I corrected in the fileutils distribution;
I assume you will just copy getdate.texi over from the other distribution
at some point.
I'm assuming that my friend Francois Pinard is responsible for using
"coerce" instead of "convert". It is very interesting usage, but not
quite the right word... :-)
- Brian Y., FSF office staff
*** sh-utils.old.texi Fri Jun 9 16:32:32 2000
--- sh-utils.texi Fri Jun 9 16:41:53 2000
***************
*** 362,374 ****
will be output correctly in all chinese locales (GB2312, BIG5, UTF-8, etc).
Note that in these examples, the full pathname of @code{printf} has been
! given, to distinguish it from the GNU bash builtin function @code{printf}.
For larger strings, you don't need to look up the hexadecimal code values of
each character one by one. ASCII characters mixed with \u escape sequences
is also known as the JAVA source file encoding. You can use GNU recode 3.5c
(or newer) to convert strings to this encoding. Here is how to convert a
! piece of text into a shell script which will output this text in a locale
independent way:
@smallexample
--- 362,375 ----
will be output correctly in all chinese locales (GB2312, BIG5, UTF-8, etc).
Note that in these examples, the full pathname of @code{printf} has been
! given, to distinguish it from the GNU @code{bash} builtin function
! @code{printf}.
For larger strings, you don't need to look up the hexadecimal code values of
each character one by one. ASCII characters mixed with \u escape sequences
is also known as the JAVA source file encoding. You can use GNU recode 3.5c
(or newer) to convert strings to this encoding. Here is how to convert a
! piece of text into a shell script which will output this text in a locale-
independent way:
@smallexample
***************
*** 758,764 ****
@code{expr} evaluates an expression and writes the result on standard
output. Each token of the expression must be a separate argument.
! Operands are either numbers or strings. @code{expr} coerces
anything appearing in an operand position to an integer or a string
depending on the operation being applied to it.
--- 759,765 ----
@code{expr} evaluates an expression and writes the result on standard
output. Each token of the expression must be a separate argument.
! Operands are either numbers or strings. @code{expr} converts
anything appearing in an operand position to an integer or a string
depending on the operation being applied to it.
***************
*** 767,772 ****
--- 768,774 ----
e.g., spaces.
@cindex parentheses for grouping
+ @c FIXME: "infix"? Francois!!! :-)
Operators may given as infix symbols or prefix keywords. Parentheses
may be used for grouping in the usual manner (you must quote parentheses
to avoid the shell evaluating them, however).
***************
*** 804,810 ****
@cindex pattern matching
@cindex regular expression matching
@cindex matching patterns
! Perform pattern matching. The arguments are coerced to strings and the
second is considered to be a (basic, a la GNU @code{grep}) regular
expression, with a @code{^} implicitly prepended. The first argument is
then matched against this regular expression.
--- 806,812 ----
@cindex pattern matching
@cindex regular expression matching
@cindex matching patterns
! Perform pattern matching. The arguments are converted to strings and the
second is considered to be a (basic, a la GNU @code{grep}) regular
expression, with a @code{^} implicitly prepended. The first argument is
then matched against this regular expression.
***************
*** 885,891 ****
@kindex -
@cindex addition
@cindex subtraction
! Addition and subtraction. Both arguments are coerced to numbers;
an error occurs if this cannot be done.
@item * / %
--- 887,893 ----
@kindex -
@cindex addition
@cindex subtraction
! Addition and subtraction. Both arguments are converted to numbers;
an error occurs if this cannot be done.
@item * / %
***************
*** 895,901 ****
@cindex multiplication
@cindex division
@cindex remainder
! Multiplication, division, remainder. Both arguments are coerced to
numbers; an error occurs if this cannot be done.
@end table
--- 897,903 ----
@cindex multiplication
@cindex division
@cindex remainder
! Multiplication, division, remainder. Both arguments are converted to
numbers; an error occurs if this cannot be done.
@end table
***************
*** 937,945 ****
@kindex >=
@cindex comparison operators
Compare the arguments and return 1 if the relation is true, 0 otherwise.
! @code{==} is a synonym for @code{=}. @code{expr} first tries to coerce
both arguments to numbers and do a numeric comparison; if either
! coercion fails, it does a lexicographic comparison.
@end table
--- 939,947 ----
@kindex >=
@cindex comparison operators
Compare the arguments and return 1 if the relation is true, 0 otherwise.
! @code{==} is a synonym for @code{=}. @code{expr} first tries to convert
both arguments to numbers and do a numeric comparison; if either
! conversion fails, it does a lexicographic comparison.
@end table
***************
*** 1621,1630 ****
Same as:
@c This is too long to write inline.
@example
! cread -ignbrk brkint -inlcr -igncr icrnl -ixoff -iuclc -ixany
! imaxbel opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel
! nl0 cr0 tab0 bs0 vt0 ff0 isig icanon iexten echo echoe echok
! -echonl -noflsh -xcase -tostop -echoprt echoctl echoke
@end example
@noindent and also sets all special characters to their default values.
--- 1623,1633 ----
Same as:
@c This is too long to write inline.
@example
! cread -ignbrk brkint -inlcr -igncr icrnl -ixoff
! -iuclc -ixany imaxbel opost -olcuc -ocrnl onlcr
! -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0
! ff0 isig icanon iexten echo echoe echok -echonl
! -noflsh -xcase -tostop -echoprt echoctl echoke
@end example
@noindent and also sets all special characters to their default values.
***************
*** 1639,1647 ****
@opindex raw
Same as:
@example
! -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr
! -icrnl -ixon -ixoff -iuclc -ixany -imaxbel -opost -isig
! -icanon -xcase min 1 time 0
@end example
@noindent May be negated. If negated, same as @code{cooked}.
--- 1642,1650 ----
@opindex raw
Same as:
@example
! -ignbrk -brkint -ignpar -parmrk -inpck -istrip
! -inlcr -igncr -icrnl -ixon -ixoff -iuclc -ixany
! -imaxbel -opost -isig -icanon -xcase min 1 time 0
@end example
@noindent May be negated. If negated, same as @code{cooked}.
***************
*** 1785,1790 ****
--- 1788,1795 ----
@item time @var{n}
@opindex time
+ @c FIXME: should "min" below be "minimum"? Or perhaps "min" should
+ @c be in italics?
Set the number of tenths of a second before reads time out if the min
number of characters have not been read, when @code{-icanon} is set.
***************
*** 1811,1817 ****
@vindex LINES
@vindex COLUMNS
Print the number of rows and columns that the kernel thinks the
! terminal has. (Systems that don't support rows and cols in the kernel
typically use the environment variables @env{LINES} and @env{COLUMNS}
instead; however, GNU @code{stty} does not know anything about them.)
Non-POSIX.
--- 1816,1822 ----
@vindex LINES
@vindex COLUMNS
Print the number of rows and columns that the kernel thinks the
! terminal has. (Systems that don't support rows and columns in the kernel
typically use the environment variables @env{LINES} and @env{COLUMNS}
instead; however, GNU @code{stty} does not know anything about them.)
Non-POSIX.
***************
*** 1826,1831 ****
--- 1831,1838 ----
@item @var{n}
@cindex baud rate, setting
+ @c FIXME: Is this still true that the baud rate can't be set
+ @c higher than 38400?
Set the input and output speeds to @var{n}. @var{n} can be one
of: 0 50 75 110 134 134.5 150 200 300 600 1200 1800 2400 4800 9600
19200 38400 @code{exta} @code{extb}. @code{exta} is the same as
***************
*** 2598,2604 ****
@end example
Suppose you had @emph{not} specified time zone information in the example above.
! Then, date would have used your computer's idea of the time zone when
interpreting the string. Here's what you would get if you were in
Greenwich, England:
--- 2605,2611 ----
@end example
Suppose you had @emph{not} specified time zone information in the example above.
! Then, @code{date} would have used your computer's idea of the time zone when
interpreting the string. Here's what you would get if you were in
Greenwich, England:
***************
*** 3247,3252 ****
--- 3254,3260 ----
@opindex --format=@var{format}
@cindex formatting of numbers in @code{seq}
Print all numbers using @var{format}; default @samp{%g}.
+ @c FIXME: "standarding"?
@var{format} must contain exactly one of the standarding floating point
output formats @samp{%e}, @samp{%f}, or @samp{%g}.