erratic sh arithmetic

Sheemon Lists sheemon.lists at gmail.com
Sat Jul 11 10:34:30 UTC 2020


Your other question remained unanswered,[so far].
What your login shell is what the login(1) process will exec.
The first two bytes in a file [visible in a text file as '#!' are what the
kernel will exec when handed a text file to run as a binary.  This is
how/why you do not need to end a shell script name with .sh,
a python script with .py, etc.  these postfixes are for us humans or
windows systems.

On Fri, Jul 10, 2020 at 12:17 PM Gary Aitken <ubuntu at dreamchaser.org> wrote:

> On 7/10/20 9:17 AM, Gary Aitken wrote:
> > On 7/10/20 12:33 AM, Karl Auer wrote:
>
> >> Haven't looked closely, but any value beginning with "0" is regarded as
> >> octal, so 08 (also 09, 18, 19, 28 and 29) should be throwing "value too
> >> great for base".
> >
> >> If it's been up for two weeks, running daily, you should have had a
> >> similar error on 28 and 29 June.
> >
> > As I recall, those failed also and caused me to try expr, which worked;
> > but then I did a sanity check and retried the old form and it worked
> > (because the day was now legal octal), which caused craziness inside
> > my head.
>
> Actually, as it's only a 2-digit number, only 08 and 09 cause problems.
> So it was a month ago that I had the same issue.
>
> Gary
>
> --
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20200711/6757017b/attachment.html>


More information about the ubuntu-users mailing list