Browse Source

add color output

arzzen 8 years ago
parent
commit
25d456955f
1 changed files with 5 additions and 5 deletions
  1. 5
    5
      pert.sh

+ 5
- 5
pert.sh View File

@@ -2,10 +2,10 @@
2 2
 
3 3
 # help text
4 4
 if [ -z "$1" ] || [[ "$1" =~ [-]*(help|h) ]]; then
5
-    echo -e "\nA command line PERT calculator for quick estimates."
5
+    echo -e "\n\033[1mA command line PERT calculator for quick estimates.\033[0m"
6 6
     echo -e "\nComma separated task list in the form \"1,2,12 4,5,9 2,3,6\", where whitespace separates tasks."
7
-    echo -e "\nUsage:\n\tpert.sh [optimistic,realistic,pessimistic]\n"
8
-    echo -e "Example:"
7
+    echo -e "\n\033[1mUsage:\033[0m\n\tpert.sh [optimistic,realistic,pessimistic]\n"
8
+    echo -e "\033[1mExample:\033[0m"
9 9
     echo -e "\tpert.sh 1,3,4"
10 10
     echo -e "\tpert.sh 10,15,20 5,7,10"
11 11
     echo -e "\tpert.sh \"1,2,3\" \"15,17,20\"\n"
@@ -30,7 +30,7 @@ function _divider
30 30
 format=" | %-12s |%11s |%10s |%12s |%9s |%9s |%9s |\n"
31 31
 
32 32
 # header
33
-echo -e "\nTasks\n"
33
+echo -e "\n\033[1mTasks\033[0m\n"
34 34
 _divider
35 35
 printf "$format" "#" "optimistic" "realistic" "pessimistic" "duration" "risk" "variance"
36 36
 _divider
@@ -87,7 +87,7 @@ if [[ $total_estimate > 0 ]]; then
87 87
     printf "$format" "summary" "-" "-" "-" $total_estimate $total_standard_deviation $total_variance
88 88
     _divider
89 89
     
90
-    echo -e "\nThree point estimates\n"
90
+    echo -e "\n\033[1mThree point estimates\033[0m\n"
91 91
     
92 92
     width=42 
93 93
     tpeformat=" | %-13s |%11s |%10s |\n"

Loading…
Cancel
Save