Re: Ping an ip address range
- From: Geoff Clare <geoff@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 27 May 2011 13:45:06 +0100
Janis Papanagnou wrote:
On 26.05.2011 12:51, Radoulov, Dimitre wrote:
On 26/05/2011 09:12, Janis Papanagnou wrote:
Is $(( k += 1 )) meanwhile standard? I thought that would be
k=$(( $k + 1 ))
If I read it correctly, now it *is* standard:
If the shell variable x contains a value that forms a valid integer constant,
then the arithmetic expansions "$((x))" and "$(($x))" shall return the same
value.
That's one aspect; x vs. $x inside $((...)). Another one, IIRC, had been
(un-)availability of operator += and (I think) also the assignment within
the $((...)) vs. outside. (I may be misremembering, though.)
The += and other assignment operators have always been mandated by
POSIX. What wasn't clear in older revisions of the standard was
whether an assignment to a shell variable inside an arithmetic
expansion has to be reflected in the value of the variable after the
expansion. I quoted the new text that clarifies this in my other post
in this thread.
--
Geoff Clare <netnews@xxxxxxxxxxxxx>
.
- Follow-Ups:
- Re: Ping an ip address range
- From: contracer
- Re: Ping an ip address range
- References:
- Ping an ip address range
- From: contracer
- Re: Ping an ip address range
- From: Janis Papanagnou
- Re: Ping an ip address range
- From: contracer
- Re: Ping an ip address range
- From: Janis Papanagnou
- Re: Ping an ip address range
- From: Chris F.A. Johnson
- Re: Ping an ip address range
- From: Janis Papanagnou
- Re: Ping an ip address range
- From: Radoulov, Dimitre
- Re: Ping an ip address range
- From: Janis Papanagnou
- Ping an ip address range
- Prev by Date: Re: What shell feature did surprise you?
- Next by Date: Re: What shell feature did surprise you?
- Previous by thread: Re: Ping an ip address range
- Next by thread: Re: Ping an ip address range
- Index(es):
Relevant Pages
|