Farbausgabe in einer linux dialog box
Hallo Community,
ich wollte gerne mal wissen wie ich in einer dialog box eine Farbe rein bekomme, habe es folgendermaßen probiert, aber ohne erfolg.
Ich bekomme aber nur folgende Ausgabe
ich wollte gerne mal wissen wie ich in einer dialog box eine Farbe rein bekomme, habe es folgendermaßen probiert, aber ohne erfolg.
function msg_output(){
local h=${1-10} # box height default 10
local w=${2-41} # box width default 41
local t=${3-Output} # box title
dialog --backtitle "Minecraft Shell Script" --title "${t}" --clear --msgbox "$(<$OUTPUT)" ${h} ${w}
}
printf "\033[31mWARNING ! For security reasons we advise: DO NOT RUN THE SERVER AS ROOT" >$OUTPUT
msg_output 10 60 "START SERVER"
Ich bekomme aber nur folgende Ausgabe
Please also mark the comments that contributed to the solution of the article
Content-Key: 297789
Url: https://administrator.de/contentid/297789
Printed on: April 18, 2024 at 06:04 o'clock
6 Comments
Latest comment
Du müsstest in die Funktion (den dialog-Aufruf) zumindest die Option "--colors" reinbekommen.
function msg_output(){
local h=${1-10}
local w=${2-41}
local t=${3-Output}
dialog --backtitle "Minecraft Shell Script" --title "${t}" --clear --colors --msgbox "$(<$OUTPUT)" ${h} ${w}
}
printf "\Z1WARNING ! For security reasons we advise: DO NOT RUN THE SERVER AS ROOT" >$OUTPUT
msg_output 10 60 "START SERVER"