
Here’s an excerpt from my ‘ .functions.sh ’ file — a file that gets read (and executed) every time I start up a new terminal-session.
llength="80"
printf -v line '%*s' "$llength"
line="${line// /-}"
Uptime="$(w|head -n 1|awk -F' ' '{print $3 " " $4}')"
printf '%bn' "$line"
printf '%bn' "tWelcome to:nt$(uname -n)n"
printf '%bn' "tUp and running $(uname -o), on the $(uname -i) platform,
for the past ${Uptime%,*}."
printf '%bn' "$line"
printf '%bn' "tIt’s now: $(date)"
printf '%bn' "$line"
printf '%bn' "tYour username is: u201cu200a${USER^}.u200au201d x3ax2dx29n"
printf '%bn' "tMay u262E be with you.n"
unset Uptime