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
 
2
 
3
 # help text
3
 # help text
4
 if [ -z "$1" ] || [[ "$1" =~ [-]*(help|h) ]]; then
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
     echo -e "\nComma separated task list in the form \"1,2,12 4,5,9 2,3,6\", where whitespace separates tasks."
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
     echo -e "\tpert.sh 1,3,4"
9
     echo -e "\tpert.sh 1,3,4"
10
     echo -e "\tpert.sh 10,15,20 5,7,10"
10
     echo -e "\tpert.sh 10,15,20 5,7,10"
11
     echo -e "\tpert.sh \"1,2,3\" \"15,17,20\"\n"
11
     echo -e "\tpert.sh \"1,2,3\" \"15,17,20\"\n"
30
 format=" | %-12s |%11s |%10s |%12s |%9s |%9s |%9s |\n"
30
 format=" | %-12s |%11s |%10s |%12s |%9s |%9s |%9s |\n"
31
 
31
 
32
 # header
32
 # header
33
-echo -e "\nTasks\n"
33
+echo -e "\n\033[1mTasks\033[0m\n"
34
 _divider
34
 _divider
35
 printf "$format" "#" "optimistic" "realistic" "pessimistic" "duration" "risk" "variance"
35
 printf "$format" "#" "optimistic" "realistic" "pessimistic" "duration" "risk" "variance"
36
 _divider
36
 _divider
87
     printf "$format" "summary" "-" "-" "-" $total_estimate $total_standard_deviation $total_variance
87
     printf "$format" "summary" "-" "-" "-" $total_estimate $total_standard_deviation $total_variance
88
     _divider
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
     width=42 
92
     width=42 
93
     tpeformat=" | %-13s |%11s |%10s |\n"
93
     tpeformat=" | %-13s |%11s |%10s |\n"

Loading…
Cancel
Save