On Thu, Oct 27, 2005 at 12:25:14PM +0100, Chris Beauchamp wrote:
>Magnus Therning wrote:
>
>> 
>> What you could do is make sure it's only done once, i.e. for the first
>> terminal that's started. Sticking something like this in ~/.bashrc might
>> do:
>> 
>>  [[ -f /tmp/todo_done ]] || ( cat ~/TODO; touch /tmp/todo_done )
>
>Of course, this will only ever display it once, and for only one user...
>a refinement maybe:
>
>
>[[ -f /tmp/todo_done$USER ]] || ( cat ~/TODO; touch /tmp/todo_done$USER )
>
>and in /etc/crontab
>
>0 6 * * * root rm /tmp/todo_done*
>
>to delete all the flags at 6am

It might be further refined for multi-user use:

[[ ! -f /tmp/todo_done$USER -a -f ~/TODO ]] && \
     ( cat ~/TODO; touch /tmp/todo_done$USER )

That can then be put in /etc/bash.bashrc.

/M

-- 
Magnus Therning                    (OpenPGP: 0xAB4DFBA4)
[EMAIL PROTECTED]
http://therning.org/magnus

Software is not manufactured, it is something you write and publish.
Keep Europe free from software patents, we do not want censorship
by patent law on written works.

Computer Scientist, n.:
A device that turns coffee into programs.

Attachment: pgpFRUvOo8u8u.pgp
Description: PGP signature

-- 
ubuntu-uk mailing list
ubuntu-uk@lists.ubuntu.com
http://lists.ubuntu.com/mailman/listinfo/ubuntu-uk

Reply via email to