Archive

Posts Tagged ‘inline’

Inline colored information text in bash

June 15, 2011 Leave a comment

#!/bin/bash

clnone="\033[0m"
clred="\033[31m"
clgreen="\033[32m"

echo -en "\r:: ${clred}Starting server     ${clnone}"
sleep 1
echo -en "\r:: ${clred}Loading resources   ${clnone}"
sleep 1
echo -en "\r:: ${clred}Loading commands    ${clnone}"
sleep 1
echo -en "\r:: ${clred}Loading callbacks   ${clnone}"
sleep 1
echo -e  "\r:: ${clgreen}Server Started    ${clnone}"
Categories: Uncategorized Tags: , ,