bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: manual: a wrong description in sample scripts


From: Micah Cowan
Subject: Re: manual: a wrong description in sample scripts
Date: Thu, 26 May 2011 11:29:03 -0700
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.14) Gecko/20110223 Thunderbird/3.1.8

(05/25/2011 10:31 PM), wu liang wrote:
> Sir,
> In the chapter "4.2 Increment a Number", it is said " The tn commands
> are not necessary, but make the thing
>  faster". However it is not correct in case that  all the digits is 9.
>  For example, 999 will not get result of 1000 but 2000, if there is no
> tn command,since it will be addressed again in the following s
> command.

Yup.

It also strikes me that the comment

# replace all leading 9s by _ (any other character except digits, could
# be used)
:d
s/9\(_*\)$/_\1/
td

is incorrect, since "leading" should mean the left-most digits, whereas
this code is clearly replacing the right-most (trailing) digits.

-- 
Micah J. Cowan
http://micah.cowan.name/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]