Abook: Show birthdays for the next 30 days
I am trying to print the names and birth dates of people whose birthday is in the next 30 days.
I use the programme abook
to store my contacts, their details, birthdays, etc.
I have not figured how to do so yet. For now, I am using this function which I added to .bashrc
:
# print all birth dates and names for a given month from abook
function abb() {
grep anniversary.*"$@"- ~/.abook/addressbook -B 7 | \
grep 'name\|anniversary'
}
so I can run:
$ abb 09
to shows the birth dates and names of contacts whose birthday is in September.
This function is far from the desired one - but that is where I am at for now. Next I need to figure how to write a script, using awk or bash I imagine, that can show all birthdays for the next 30 days. Suggestions welcome https://yctct.com/contact
Before using the above function, I used the following (for example to show birthdays in September):
$ grep anniversary.*09- ~/.abook/addressbook -B 6 | grep 'name\|anniversary'
personal computing command-line interface (cli) gnu linux trisquel shell literacy office applications wiki abook offline text processing