Replace echo -e with printf for portable ANSI banners
dash (Debian's /bin/sh) doesn't support echo's -e flag: it prints "-e" literally as text before processing the rest of the string's backslash escapes. Every script's colored banner was affected. printf's escape handling is POSIX-mandated and behaves identically under dash and bash, so swap all 90 echo -e calls for printf, appending the trailing \n that echo used to add implicitly. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
+3
-3
@@ -1,13 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo -e '
|
||||
printf '
|
||||
_ _ _ _
|
||||
__| | |__ | | | |___ ___ _ _
|
||||
/ _` | _ \ | |_| (_-</ -_) _|
|
||||
\__,_|_.__/ \___//__/\___|_|
|
||||
'
|
||||
\n'
|
||||
|
||||
echo -e "Create new mysql db and user (you will be asked a db name and a password)"
|
||||
printf "Create new mysql db and user (you will be asked a db name and a password)\n"
|
||||
|
||||
if [ "$(id -u)" -ne 0 ]; then
|
||||
echo "Please run as root"
|
||||
|
||||
Reference in New Issue
Block a user