From d969fef6e0647bbbc3eba3010f3df9ba8c604d35 Mon Sep 17 00:00:00 2001 From: iSergio Date: Wed, 11 Apr 2018 16:31:21 +0300 Subject: [PATCH] Add separate functions --- contrib/functions.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 contrib/functions.sh diff --git a/contrib/functions.sh b/contrib/functions.sh new file mode 100644 index 0000000..21fbdfd --- /dev/null +++ b/contrib/functions.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +DONE="[ done ]" +FAIL="[ fail ]" + +DOTSTRING="" +cols=`tput cols` +cols=$((cols - 10)) +cols=$((cols / 2)) +for i in `seq 1 $cols`; do + DOTSTRING=$DOTSTRING"." +done +function align_left() { + local chars="$1" + local str="${@:2}" + echo -n ${str}${chars:${#str}} +} -- GitLab