fully working initial build

This commit is contained in:
James Tomasino 2018-05-29 19:27:44 -04:00
parent 322904fc4f
commit bb15800e09
1 changed files with 2 additions and 2 deletions

4
track
View File

@ -183,9 +183,9 @@ main () {
if [ ${flag_listall} -gt 0 ]; then
awk -F "," 'NR>1 {printf "%s-%s-%s\t%s\t\n", $1, $2, $3, $4;}' "$f"
elif [ ${flag_listnum} -gt 0 ]; then
printf "print %s values of %s\n" "${arg_listnum}" "${arg_metric}"
tail -n "${arg_listnum}" "$f" | awk -F "," '{printf "%s-%s-%s\t%s\t\n", $1, $2, $3, $4;}'
else
printf "print current value of %s\n" "${arg_metric}"
tail -n 1 "$f" | awk -F "," '{printf "%s-%s-%s\t%s\t\n", $1, $2, $3, $4;}'
fi
fi
fi