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

Re: notify via virtual terminal available packages



On Thu, 24 Sep 2020 10:38:55 -0400
Greg Wooledge <wooledg@eeg.ccf.org> wrote:

> In dash, RANDOM does nothing; it's just an empty variable.  And as it
> turns out, dash treats that as a zero.
> 
> unicorn:~$ dash
> $ echo $((1 + RANDOM % 1200))
> 1
> $ echo $((1 + % 1200))
> dash: 2: arithmetic expression: expecting primary: "1 + % 1200"
> $ echo $((1 + XYZZY % 1200))
> 1
> 
> So you're just doing "sleep 1" every time.

Ah, thank you. Yup. Which is weird, because it worked when I first
wrote that many years ago. I may or may not remove that part of the
line. But I will move toward more use of unattended-upgrades, which
handles the original problem differently.

-- 
Does anybody read signatures any more?

https://charlescurley.com
https://charlescurley.com/blog/


Reply to: