Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Wrong Syntax Highlighting # when used for base conversion #163

@glenntanner3

Description

@glenntanner3

When expliciting setting base, remaining line is highlighted as a comment.

https://tldp.org/LDP/abs/html/numerical-constants.html

A shell script interprets a number as decimal (base 10), unless that number has a special prefix or notation. A number preceded by a 0 is octal (base 8). A number preceded by 0x is hexadecimal (base 16). A number with an embedded # evaluates as BASE#NUMBER (with range and notational restrictions).

LAST_HOST="08"
HOST="0"$((10#${LAST_HOST}+1))
echo ${HOST}

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions