Re: Document m=1 m=2; echo $m result

2023-07-03 Thread alex xmb ratchev
On Mon, Jul 3, 2023, 18:22 Dennis Williamson wrote: > > > On Mon, Jul 3, 2023 at 11:11 AM alex xmb ratchev > wrote: > >> >> >> >> thats a like 30% or smth >> enuff for me >> i d be the fool typing nonsensly ; s >> > > Do what you like, but percentages don't mean anything unless you're > running

Re: Document m=1 m=2; echo $m result

2023-07-03 Thread Dennis Williamson
On Mon, Jul 3, 2023 at 11:11 AM alex xmb ratchev wrote: > > > > thats a like 30% or smth > enuff for me > i d be the fool typing nonsensly ; s > Do what you like, but percentages don't mean anything unless you're running a lot of assignments in a loop like the artificial conditions in the test

Re: Document m=1 m=2; echo $m result

2023-07-03 Thread alex xmb ratchev
On Mon, Jul 3, 2023, 18:01 Dennis Williamson wrote: > > > On Mon, Jul 3, 2023 at 10:32 AM alex xmb ratchev > wrote: > >> >> i chain assignments , have impression its faster >> >> kre >> > >> > >> > >> > > Tests are better than impressions. Sometimes they match though. > > $ time for ((i = 0; i

Re: Document m=1 m=2; echo $m result

2023-07-03 Thread Dennis Williamson
On Mon, Jul 3, 2023 at 10:32 AM alex xmb ratchev wrote: > > i chain assignments , have impression its faster > > kre > > > > > > > Tests are better than impressions. Sometimes they match though. $ time for ((i = 0; i <= 100; i++)); do j=$i; k=$j; m=10; n=foobarbazqux; p=100; q=$n;

Re: Document m=1 m=2; echo $m result

2023-07-03 Thread alex xmb ratchev
On Mon, Jul 3, 2023, 14:41 Robert Elz wrote: > Date:Sun, 2 Jul 2023 21:04:38 -0400 > From:Greg Wooledge > Message-ID: > > | The first assignment is done before the value of "m" is used in the > second > | assignment. > > Note that that is a shell specific

Re: Document m=1 m=2; echo $m result

2023-07-03 Thread Robert Elz
Date:Sun, 2 Jul 2023 21:04:38 -0400 From:Greg Wooledge Message-ID: | The first assignment is done before the value of "m" is used in the second | assignment. Note that that is a shell specific feature, applies to bash, but not necessarily to other shells (some

Re: Document m=1 m=2; echo $m result

2023-07-02 Thread Dan Jacobson
> "LV" == Lawrence Velázquez writes: LV> This is stated under "Simple Command Expansion". OK good. No more issue.

Re: Document m=1 m=2; echo $m result

2023-07-02 Thread Greg Wooledge
On Sun, Jul 02, 2023 at 08:56:08PM -0400, Lawrence Velázquez wrote: > On Sun, Jul 2, 2023, at 8:30 PM, Dan Jacobson wrote: > > OK, but do please mention somewhere that "if the variable is set more > > than once within the same statement, the final value is used." > > > > $ m=1 m=2; echo $m > >

Re: Document m=1 m=2; echo $m result

2023-07-02 Thread Lawrence Velázquez
On Sun, Jul 2, 2023, at 8:30 PM, Dan Jacobson wrote: > man page says: > >A variable may be assigned to by a statement of the form > > name=[value] > >If value is not given, the variable is assigned the null string. All >values undergo tilde expansion,

Document m=1 m=2; echo $m result

2023-07-02 Thread Dan Jacobson
man page says: A variable may be assigned to by a statement of the form name=[value] If value is not given, the variable is assigned the null string. All values undergo tilde expansion, parameter and variable expansion... OK, but do please mention