bug-bash
[Top][All Lists]
Advanced

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

Re: Minor documentation suggestion: while/until


From: Dennis Williamson
Subject: Re: Minor documentation suggestion: while/until
Date: Wed, 22 Dec 2010 18:44:54 -0600

In this context, "list" represents a syntactic element rather than a
literal variable. If you read the section above, titled "Lists",
you'll see:

Lists
       A list is a sequence of one or more pipelines separated by one  of  the
       operators ;, &, &&, or ⎪⎪, and optionally terminated by one of ;, &, or
       <newline>.


On Mon, Dec 20, 2010 at 4:23 PM, address@hidden
<address@hidden> wrote:
> Configuration Information [Automatically generated, do not change]:
> Machine: i686
> OS: linux-gnu
> Compiler: gcc
> Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i686'
> -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu'
> -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL
> -DHAVE_CONFIG_H   -I.  -I../bash -I../bash/include -I../bash/lib   -g -O2
> -Wall
> uname output: Linux jsh-green-netbook 2.6.35-24-generic #42-Ubuntu SMP Thu
> Dec 2 01:41:57 UTC 2010 i686 GNU/Linux
> Machine Type: i686-pc-linux-gnu
>
> Bash Version: 4.1
> Patch Level: 5
> Release Status: release
>
> Description:
> Documentation nit: "list" overloaded in while/until description.
>
> Repeat-By:
>
> Here's the bash(1) man page section for while/until:
>
> while list; do list; done
>  until list; do list; done
>      The while command continuously executes the do list as long as the
> last command in  list
>      returns  an  exit  status of zero.  The until command is identical to
> the while command,
>      except that the test is negated; the do list is executed as long as
> the last command  in
>      list returns a non-zero exit status.  The exit status of the while and
> until commands is
>      the exit status of the last do list command executed, or zero if none
> was executed.
>
>
> Fix:
>
> If you changed them to something like this:
>
> while listA; do listB; done
>  until listA; do listB; done
>      The while command continuously executes listB as long as the last
> command in listA
>      returns  an  exit  status of zero.  The until command is identical to
> the while command,
>      except that the test is negated; listB is executed as long as the last
> command in
>      listA returns a non-zero exit status.  The exit status of the while
> and until commands is
>      the exit status of the last command executed in listB, or zero if none
> was executed.
>
> I think they'd be easier to read.
>
> --
> Jeffrey Haemer <address@hidden>
> 720-837-8908 [cell], http://seejeffrun.blogspot.com [blog],
> http://www.youtube.com/user/goyishekop [vlog]
> פרייהייט? דאס איז יאַנג דינען וואָרט.
> *
> *
>



reply via email to

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