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

Wrong Syntax Highlighting # when used for base conversion #163

Open
glenntanner3 opened this issue Oct 16, 2020 · 0 comments
Open

Wrong Syntax Highlighting # when used for base conversion #163

glenntanner3 opened this issue Oct 16, 2020 · 0 comments

Comments

@glenntanner3
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant