[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How How one reliably get is the maximum integer value
From: |
Budi |
Subject: |
Re: How How one reliably get is the maximum integer value |
Date: |
Thu, 28 Jul 2022 17:13:31 +0700 |
How can one reliably get is the maximum integer numeric value in one's
bash currently installed as is ?
On 7/27/22, help-bash-request@gnu.org <help-bash-request@gnu.org> wrote:
> Send Help-bash mailing list submissions to
> help-bash@gnu.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.gnu.org/mailman/listinfo/help-bash
> or, via email, send a message with subject or body 'help' to
> help-bash-request@gnu.org
>
> You can reach the person managing the list at
> help-bash-owner@gnu.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Help-bash digest..."
>
>
> Today's Topics:
>
> 1. Bash native command to reverse the order of most basic
> parameter (Budi)
> 2. Re: Bash native command to reverse the order of most basic
> parameter (Greg Wooledge)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Wed, 27 Jul 2022 08:50:05 +0700
> From: Budi <budikusasi@gmail.com>
> To: help-bash@gnu.org
> Subject: Bash native command to reverse the order of most basic
> parameter
> Message-ID:
> <CAH0GyZAMnjp0Abh0JqSgN-VJAz4tEXbAk3MaEH=9PbPFxfadNQ@mail.gmail.com>
> Content-Type: text/plain; charset="UTF-8"
>
> How the Bash native command to reverse the order of native bash
> parameter loop illustrated:
> Code:
> $ foo() {
> for i ;{ printf "%d\n" $i; } # ? what is solution
> }
> not to be
> Code:
> $ foo 7 8 9
> 7
> 8
> 9
> instead must do
>
> Code:
> $ foo 7 8 9
> 9
> 8
> 7
>
>
>
> ------------------------------
>
> Message: 2
> Date: Tue, 26 Jul 2022 22:29:11 -0400
> From: Greg Wooledge <greg@wooledge.org>
> To: help-bash@gnu.org
> Subject: Re: Bash native command to reverse the order of most basic
> parameter
> Message-ID: <YuCi9928qmozKKxm@wooledge.org>
> Content-Type: text/plain; charset=us-ascii
>
> On Wed, Jul 27, 2022 at 08:50:05AM +0700, Budi wrote:
>> How the Bash native command to reverse the order of native bash
>> parameter loop illustrated:
>
>> Code:
>> $ foo 7 8 9
>> 9
>> 8
>> 7
>
> revparm() {
> local i
> for ((i=$#; i>=1; i--)); do
> printf '%s\n' "${!i}"
> done
> }
>
>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> Help-bash mailing list
> Help-bash@gnu.org
> https://lists.gnu.org/mailman/listinfo/help-bash
>
>
> ------------------------------
>
> End of Help-bash Digest, Vol 129, Issue 10
> ******************************************
>
- Re: How How one reliably get is the maximum integer value,
Budi <=