From 34b9568afbda83bf7e6d62df48e208d0b2f0db13 Mon Sep 17 00:00:00 2001 From: emmett1 Date: Mon, 27 Apr 2020 13:09:02 +0800 Subject: [PATCH] fix printf colourize --- scratch | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scratch b/scratch index ba41335..7629884 100755 --- a/scratch +++ b/scratch @@ -35,27 +35,27 @@ nocolor() { } msg() { - printf '%s\n' "${GREEN}==>${CRESET} $1\n" + printf "${GREEN}==>${CRESET} %s\n" "$1" } msginst() { - printf '%s\n' "[${GREEN}i${CRESET}] $1\n" + printf "[${GREEN}i${CRESET}] %s\n" "$1" } msgmiss() { - printf '%s\n' "[${YELLOW}m${CRESET}] $1\n" + printf "[${YELLOW}m${CRESET}] %s\n" "$1" } msgnoinst() { - printf '%s\n' "[-] $1\n" + printf "[-] %s\n" "$1" } msgerr() { - printf '%s\n' "${RED}==> ERROR:${CRESET} $1\n" >&2 + printf "${RED}==> ERROR:${CRESET} %s\n" "$1" >&2 } msgwarn() { - printf '%s\n' "${YELLOW}==> WARNING:${CRESET} $1\n" >&2 + printf "${YELLOW}==> WARNING:${CRESET} %s\n" "$1" >&2 } needroot() {