GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — shell-script/030-agenda.sh at master · srinivart/shell-script

Expand file tree

/

030-agenda.sh

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
executable file
·
42 lines (29 loc) · 1.02 KB
/

030-agenda.sh

Copy path

File metadata and controls

executable file
·
42 lines (29 loc) · 1.02 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
41
42
#!/bin/sh
# agenda - scan through the user's .agenda file to see if there
# are any matches for the current or next day
agendafile="$HOME/.agenda"
checkDate()
{
# create the possible default values that'll match today
weekday=$1 day=$2 month=$3 year=$4
format1="$weekday" format2="$day$month" format3="$day$month$year"
# and step through the file comparing dates...
IFS="|" # The reads will naturally split at the IFS
echo "On the Agenda for today:"
while read date description ; do
if [ "$date" = "$format1" -o "$date" = "$format2" -o "$date" = "$format3" ]
then
echo " $description"
fi
done < $agendafile
}
if [ ! -e $agendafile ] ; then
echo "$0: You don't seem to have an .agenda file. " >&2
echo "To remedy this, please use 'addagenda' to add events" >&2
exit 1
fi
# now let's get today's date...
eval $(date "+weekday=\"%a\" month=\"%b\" day=\"%e\" year=\"%G\"")
day="$(echo $day|sed 's/ //g')" # remove possible leading space
checkDate $weekday $day $month $year
exit 0
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.