help-bash
[Top][All Lists]
Advanced

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

Are you trolling us?


From: eduardo-chibas
Subject: Are you trolling us?
Date: Thu, 29 Jul 2021 20:00:04 +0200

> Sent: Friday, July 30, 2021 at 5:47 AM
> From: "Leonid Isaev (ifax)" <leonid.isaev@ifax.com>
> To: help-bash@gnu.org
> Subject: Re: Are you trolling us?
>
> On Thu, Jul 29, 2021 at 07:26:50PM +0200, eduardo-chibas@caramail.com wrote:
> > The suggestion is to set everything.
>
> Well, yesh, you are supposed to always initialize your variables.
>
> > local help=0 ; f=0 ; vb=0 ; fs="" ; incl="" ; excl="" ; pn=0 ; qn=0 ; dyn=1 
> > ; ctx=8 ; fdir=""
>
> This is wrong -- you don't need ";" here, e.g. "local a=0 b=1". The above code
> is equivalent to:
> -----8<-----
> local help=0
>
> f=0
> vb=0
> ...
> ----->8-----
>
> > A simple script has became a monster.
>
> Because of 2 extra line? How was it not a monster before, given that you need
> all these variables?

No, because of my first attempt for a function ta call another after the 
function
got too complicated to do everything in one.  I could be better off writing a C
program than using bash scripts.

> --
> Leonid Isaev
>
>



reply via email to

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