1
1
Fork 0

added read and edit feature to journal.sh

This commit is contained in:
David Starzengruber 2012-04-08 23:22:10 +02:00
parent f4dcb02fe5
commit da9910784a
1 changed files with 12 additions and 1 deletions

View File

@ -4,7 +4,6 @@
# track of what i do and think
#check if output file is given as first option
if [ -z $1 ]; then
outputfile=journal.txt
@ -12,6 +11,18 @@ else
outputfile=$1
fi
if [ -z $2 ]; then
:
else
if [ $2 = "read" ]; then
less $outputfile
exit $?
elif [ $2 = "edit" ]; then
vim $outputfile
exit $?
fi
fi
#generating timestamp
timestamp=$(date '+%d.%m.%Y %H:%M')