-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaof
More file actions
executable file
·40 lines (29 loc) · 693 Bytes
/
Copy pathaof
File metadata and controls
executable file
·40 lines (29 loc) · 693 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash
aiString=""
if [ $# = 1 ]; then
aiString="$1"
else
echo "Usage: aof ai"
fi
today=`date +"%d"`
set cnt="01"
if [ -f $HOME/bin/.ai.count ]; then
day=`cat $HOME/bin/.ai.count | awk '{print $1}'`
cnt=`cat $HOME/bin/.ai.count | awk '{print $2}'`
fi
if [ "$today" = "$day" ]; then
cnt=`expr $cnt + 1`
cnt=`printf "%0.2d\n" $cnt`
echo "$today $cnt" >$HOME/bin/.ai.count
else
cnt="01"
echo "$today $cnt" >$HOME/bin/.ai.count
fi
if [ "$aiString" = "" ]; then
echo 'Enter AI'; read aiString
fi
AINUM=`date +"%m%d%y.$cnt"`
ai="${AINUM} ${aiString} @ Work"
echo "${ai}"
echo "${ai}" >/Users/stephenfitch/tmp/myLastAI
/Users/stephenfitch/bin/add2omnifocus