2
0
Fork 0
mirror of https://github.com/alexanderepstein/Bash-Snippets synced 2018-11-08 02:59:35 +01:00

Fixing bc error in todo

This commit is contained in:
Alex Epstein 2017-08-29 04:17:26 -04:00
parent 566cf8c810
commit 608cab1f3d

View file

@ -139,8 +139,9 @@ getTasks()
count="1"
IFS=$'\n' # make newlines the only separator
for task in $(cat ~/.todo/list.txt); do
if [ $count -lt 10 ]; then count="0$count"; fi
echo "$count). $task" >> ~/.todo/getTemp.txt
tempTask=$count
if [ $count -lt 10 ]; then tempTask="0$count"; fi
echo "$tempTask). $task" >> ~/.todo/getTemp.txt
count=$(( $count + 1 ))
done
cat ~/.todo/getTemp.txt | column -t -s ";"