prnt now output to STDERR allowing printing in functions returning results on STDOUT
This commit is contained in:
@@ -95,30 +95,30 @@ export On_IWhite='\e[0;107m'
|
||||
prnt()
|
||||
{
|
||||
if [[ $1 == "-n" ]]; then
|
||||
local echoopt=$1
|
||||
shift
|
||||
local echoopt=$1
|
||||
shift
|
||||
else
|
||||
local echoopt=""
|
||||
local echoopt=""
|
||||
fi
|
||||
case $1 in
|
||||
"I")
|
||||
local heads="[ ${IGreen}info${DEFAULTFG} ]"
|
||||
shift
|
||||
;;
|
||||
"W")
|
||||
local heads="[${IYellow}Warning${DEFAULTFG}]"
|
||||
shift
|
||||
;;
|
||||
"E")
|
||||
local heads="[ ${IRed}ERROR${DEFAULTFG} ]"
|
||||
shift
|
||||
;;
|
||||
"m")
|
||||
local heads=" "
|
||||
shift
|
||||
;;
|
||||
"I")
|
||||
local heads="[ ${IGreen}info${DEFAULTFG} ]"
|
||||
shift
|
||||
;;
|
||||
"W")
|
||||
local heads="[${IYellow}Warning${DEFAULTFG}]"
|
||||
shift
|
||||
;;
|
||||
"E")
|
||||
local heads="[ ${IRed}ERROR${DEFAULTFG} ]"
|
||||
shift
|
||||
;;
|
||||
"m")
|
||||
local heads=" "
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
echo $echoopt -e "${IWhite}$(date $DATEFORMAT)${DEFAULTFG} ${heads} $@"
|
||||
echo $echoopt -e "${IWhite}$(date $DATEFORMAT)${DEFAULTFG} ${heads} $@" >&2
|
||||
|
||||
unset heads echoopt
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user