I'm having a bit of a time with the calendar.sh script I found on the
Net; it doesn't display quite correctly.
It should have brackets around the current date, but I can't figure out
what is not functioning correctly:

#!/bin/sh
cal | awk 'NR>2' | sed -e 's/   /    /g' -e 's/[^ ] /& /g' -e 's/..*/  &
/' -e 's/ \('`date | awk '{print $2}'`'\) /\['`date | awk '{print $2}'`'\]/'

Change the NR>2 to NR1 and the printout includes the days of the week:
  Su  Mo  Tu  We  Th  Fr  Sa
               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

Since today is the 10th, we should be seeing [10] - but we are not.
Also, there is the problem of the 1,2,3 not showing in the right days -
in conky this can be fixed by not using xft... but then I'm not sure of
how to change the font size... perhaps the xorg screen size is the
default ???

I'm not very good at programming, but I did look up the man pages for
cal, sed and awk but it is a little complicated for my little brain.
Can anyone help, please?
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"

Reply via email to