mirror of
https://github.com/CISOfy/lynis.git
synced 2026-03-11 08:55:28 +00:00
Strip quotes in locale output, e.g. macOS
This commit is contained in:
parent
8596156ca1
commit
44fb7efd64
1 changed files with 1 additions and 1 deletions
2
lynis
2
lynis
|
|
@ -216,7 +216,7 @@
|
|||
|
||||
# Extract the short notation of the language (first two characters).
|
||||
if [ -x "$(command -v locale 2> /dev/null)" ]; then
|
||||
LANGUAGE=$(locale | egrep "^LANG=" | cut -d= -f2 | cut -d_ -f1 | egrep "^[a-z]{2}$")
|
||||
LANGUAGE=$(locale | egrep "^LANG=" | cut -d= -f2 | cut -d_ -f1 | tr -d '"' | egrep "^[a-z]{2}$")
|
||||
# Try locale command if shell variable had no value
|
||||
if [ -z "${DISPLAY_LANG}" ]; then
|
||||
DISPLAY_LANG=$(locale | egrep "^LANG=" | cut -d= -f2)
|
||||
|
|
|
|||
Loading…
Reference in a new issue