Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[mini-trick] signature nelle email usando fortune
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) Risorse italiane (documentazione e tools)
View previous topic :: View next topic  
Author Message
GianX
n00b
n00b


Joined: 13 Sep 2004
Posts: 67
Location: Ragusa

PostPosted: Thu Sep 01, 2005 5:59 pm    Post subject: [mini-trick] signature nelle email usando fortune Reply with quote

Forse è una banalità ma visto che mi è riuscito perchè non condivederla, piccole cose da newbie :) .
in pratica si tratta di usare fortune per generare frasi random da usare come firma per le mail

per prima cosa bisogna emergere fortune (io ho installato fortune-mod-it che contiene anche frasi italiano)

Code:
#emerge fortune-mod-it


poi ho creato un semplicissimo script per la bash per eseguire fortune

Code:
nano -w firma


dentro ho messo:

Code:
 #!/bin/bash
echo "nome o nick" >  /home/utente/signature
/usr/bin/fortune >> /home/utente/signature


l'ho reso eseguibile

Code:
#chmod +x firma


e l'ho copiato sotto /usr/bin

infine ho aggiunto lo script a cron affinchè venga eseguito a intervalli regolari
io uso vixie-cron quindi mel mio caso:

Code:
#nano -w crons.cron


all'interno del file ho messo

Code:
*     *     *     *     *        /usr/bin/firma


in questo modo lo script viene eseguito ogni minuto...forse e' troppo, ma a me piace cosi' :wink:

si lancia

Code:
# crontab crons.cron


per cron consultare http://www.gentoo.org/doc/it/cron-guide.xml

e infine si imposta /home/utente/signature come firma nel proprio programma di posta
_________________
forum italiano su freeBSD
http://www.freebsd-it.org


Last edited by GianX on Fri Sep 02, 2005 6:58 am; edited 3 times in total
Back to top
View user's profile Send private message
comio
Advocate
Advocate


Joined: 03 Jul 2003
Posts: 2191
Location: Taranto

PostPosted: Thu Sep 01, 2005 6:42 pm    Post subject: Reply with quote

sono un utente di fortune da taaaaaaanto tempo!

Proporrei questo post per i post utilissimi!!

ciao
_________________
RTFM!!!!

e

http://www.comio.it
:)
Back to top
View user's profile Send private message
federico
Advocate
Advocate


Joined: 18 Feb 2003
Posts: 3272
Location: Italy, Milano

PostPosted: Thu Sep 01, 2005 6:53 pm    Post subject: Reply with quote

Piu' che utile e' un simpatico trick :)
Nota di colore: Ci sono alcuni mailer che supportano come firma l'output di un programma
_________________
Sideralis www.sideralis.org
Pic http://blackman.amicofigo.com/gallery
Arduino http://www.arduino.cc
Chi aveva potuto aveva spaccato
2000 pezzi buttati là
Molti saluti,qualche domanda
Semplice come musica punk
Back to top
View user's profile Send private message
Sasdo
Guru
Guru


Joined: 18 Feb 2004
Posts: 542
Location: 44.476474,11.644446 circa.

PostPosted: Thu Sep 01, 2005 7:14 pm    Post subject: Reply with quote

C'è un piccolo errore:

non è

Code:
emerge fortune-mot-it

bensì:
Code:
emerge fortune-mod-it


Nice trick!

Ciao!
_________________
LinuxUser #362518
--
Ochei lo ammetto: il mio cervello lo tengo in frigo.
Back to top
View user's profile Send private message
iro
n00b
n00b


Joined: 23 Dec 2004
Posts: 59
Location: Modena, Italy

PostPosted: Thu Sep 01, 2005 7:51 pm    Post subject: Reply with quote

Code:
#chmod +x signature


forse intendevi

Code:
#chmod +x firma


:?:
Back to top
View user's profile Send private message
.:deadhead:.
Advocate
Advocate


Joined: 25 Nov 2003
Posts: 2963
Location: Milano, Italy

PostPosted: Thu Sep 01, 2005 11:33 pm    Post subject: Reply with quote

federico wrote:
Nota di colore: Ci sono alcuni mailer che supportano come firma l'output di un programma
vero, ma strano a dirsi, thunderbird no :-(

era così carino mettere una citazione da zozzital
Code:
USE="offensive" emerge fortune-mod-it
in ogni mail! adesso grazie a questo tip potrò tornare ad avere le mail più divertenti di tutta internet :mrgreen:
_________________
Proudly member of the Gentoo Documentation Project: the Italian Conspiracy ! ;)
Back to top
View user's profile Send private message
Apetrini
Veteran
Veteran


Joined: 09 Feb 2005
Posts: 1158

PostPosted: Fri Sep 02, 2005 2:18 am    Post subject: Reply with quote

Grandeeeee

Adoro fortune, è veramente un programma che mi tiene compagnia in ogni situazione, ormai è il mio amico immaginario...

Io questo trick lo metterei tra i post utilissimi, penso che alla lunga un sacco di gente apprezzerà questa opportunità.
_________________
Linux ape 2.6.31-vanilla. Paludis since 0.28.0.
Back to top
View user's profile Send private message
GianX
n00b
n00b


Joined: 13 Sep 2004
Posts: 67
Location: Ragusa

PostPosted: Fri Sep 02, 2005 6:57 am    Post subject: Reply with quote

iro wrote:
Code:
#chmod +x signature


forse intendevi

Code:
#chmod +x firma


:?:


si hai ragione correggo subito, ma la fretta di metterlo sul forum mi ha fatto saltare qualche controllo :oops:
_________________
forum italiano su freeBSD
http://www.freebsd-it.org
Back to top
View user's profile Send private message
GiRa
l33t
l33t


Joined: 07 Apr 2005
Posts: 717

PostPosted: Fri Sep 02, 2005 8:03 am    Post subject: Reply with quote

Aggiungo che c'è un'opzione di fortune per generare frasi brevi. Non è bello qunado su un NG ti trovi 13 righe di signature!
Back to top
View user's profile Send private message
GianX
n00b
n00b


Joined: 13 Sep 2004
Posts: 67
Location: Ragusa

PostPosted: Fri Sep 02, 2005 11:40 am    Post subject: Reply with quote

GiRa wrote:
Aggiungo che c'è un'opzione di fortune per generare frasi brevi. Non è bello qunado su un NG ti trovi 13 righe di signature!


si effettivamente basta aggiungere l'opzione -s
Code:

#fortune -s

_________________
forum italiano su freeBSD
http://www.freebsd-it.org
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) Risorse italiane (documentazione e tools) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum