You are not logged in.
Pages: 1
Where to find this calendar?
http://www.computerhope.com/unix/ucalande.htm
I had it on ubuntu, and liked it, used it to show me the "today appointment" in conky. Anyone knows where is it? Or some light alternative?
Last edited by archman-cro (2010-07-09 23:40:41)
Offline
No idea, but it looks very similar to remind, which is in community.
Offline
It is in the util-linux-ng package. The command is cal.
Edit: Oh, I now see that's probably not what you were asking for. Sorry.
Last edited by dcc24 (2010-04-10 10:45:13)
It is better to keep your mouth shut and be thought a fool than to open it and remove all doubt. (Mark Twain)
Offline
cal displays a calendar^^
Offline
I know, guys, but i want some calendar which will output a message only (from a file) for today (example, for April 10th)
I used to do "calendar -l 0 -f <file with dates>" and it'd echo the line which corresponds with the date.
Example:
user@arch ~]$ calendar -l 0 -f dates.txt
You need to go climbing today.
Any ideas?
Thanks for the replies, btw.
Last edited by archman-cro (2010-04-10 11:28:20)
Offline
You may have a look at "pal" from extra. Citing from "man pal":
pal is a command‐line calendar utility. It displays a cal(1)‐like calender
and events specified in text files.
OPTIONS
The following options are provided by pal:
-d date
Show events on the given date. Valid formats for date include: dd,
mmdd, yyyymmdd, 'yesterday', 'today', 'tomorrow', 'n days away', 'n
days ago', first two letters of weekday, 'next ' followed by first two
letters of weekday, 'last ' followed by first two letters of weekday,
'1 Jan 2000', 'Jan 1 2000'.
( . . . )
Event Files
Event files are ASCII or UTF-8 text files (usually with a .pal ending)
that define events for pal to show. Example event files can be found in
/usr/share/pal. The first line in these files indicate settings that
apply to all of the events in the file. The first line starts with two
characters that should be used in the calendar that pal displays. A
longer description of the kinds of events in the file follows the two
characters. This description will be displayed when the -r argument is
used. All other lines in the file are in the format date event. date
defines when the event occurs and event is a string that describes the
event.
Last edited by bernarcher (2010-04-10 12:03:59)
To know or not to know ...
... the questions remain forever.
Offline
berbarcher, I've tried it, it gives to many output. I practically want it to display my appointment like with a "cat" command, nothing more.
Anyone knows where can I find this "calendar" thing? :S
Offline
Does apt have a functionality similar to "pacman -Qo" that shows the owner of a package? If so, you can see which package it belongs to with "<some apt command> $(which calendar)"
It is better to keep your mouth shut and be thought a fool than to open it and remove all doubt. (Mark Twain)
Offline
grep "$(date '+%b %d')" dates.txt
Apr 10: Go climbing.
Offline
You might try 'when' from community: http://www.archlinux.org/packages/community/any/when/
Online man page: http://www.lightandmatter.com/when/when.html
Tutorial, if one is needed: http://www.linux.com/archive/feature/114127
Offline
grep "$(date '+%b %d')" dates.txt
Apr 10: Go climbing.
Wow , thanks, man! That's it. That's one of the things why I wanna learn bash properly.
So the command goes like this for me:
grep "$(date '+%d %m')" <path_to_file>
@ dcc24: I don't use ubuntu anymore since I've switched to Arch. Thanks, anyway!
@ thisoldman: thanks!
Last edited by archman-cro (2010-04-10 16:30:47)
Offline
Calcurse from community maybe interesting, too.
"The mind can make a heaven out of hell or a hell out of heaven" -- John Milton
Offline
@ muunleit, tried it, but removed it, cause "date" does the job. Thanks anyway!
Offline
How about the best of both worlds. Just make sure to structure your date command to match whatever date you have in your file so grep can find it. Also I chose "grep -F" to save you 1/1000000th of a second processor time cause every bit helps!
A slightly prettier version of the same command.
clear && cal && printf "%s\n\n" "$(grep -F "$(date '+%b %d')" dates.txt)"
Output:
April 2010
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
Apr 24 Have Fun!
[07:02 PM harry@ ~]$
The "clear &&" is for making it stand-out in the terminal. For other uses you might want to drop it.
In solving a problem of this sort, the grand thing is to be able to reason backward. That is a very useful accomplishment, and a very easy one, but people do not practice it much. In the everyday affairs of life it is more useful to reason forward, and so the other comes to be neglected. There are fifty who can reason synthetically for one who can reason analytically. --Sherlock Holmes
Offline
@harryNID: Sorry, I didn't see your reply. It looks awesome. Thanks!
Offline
My pleasure.:D
That's my way of learning BASH. I search for little problems like this and try to figure them out. To tell you the truth I had forgot about this post too. I just happened back here while looking through the forum.
In solving a problem of this sort, the grand thing is to be able to reason backward. That is a very useful accomplishment, and a very easy one, but people do not practice it much. In the everyday affairs of life it is more useful to reason forward, and so the other comes to be neglected. There are fifty who can reason synthetically for one who can reason analytically. --Sherlock Holmes
Offline
Pages: 1