Easy Auto Gen quote's for email signature

Write tutorials and howtos in here
There are more tutorials here http://community.linuxmint.com/tutorial/welcome
Forum rules
Do not start a support topic here please. Before you post please read this

Easy Auto Gen quote's for email signature

Postby marcus0263 on Fri Feb 09, 2007 12:25 am

Personally I love this -

1) Crack open a text editor, my favorite is vi
2) Here's a copy of my bash script -
Code: Select all
#!/bin/bash
echo `/usr/bin/fortune -n 150 -s -e politics familyguy homer dubya calvin` | cat /home/username/.signature.tag - > /home/username/.signature


3) Save as something like
email-sig.sh

4) Make it executable

5) Edit /etc/crontab

Code: Select all
#min    hour   date     mon     wkday   command
*/5     *       *       *       *       root    /usr/sbin/email-sig.sh


Then point your email client to your signature, which in my case is /home/username/.signature

To check the options for fortune just hit the man page -

Cheers
User avatar
marcus0263
Level 4
Level 4
 
Posts: 362
Joined: Mon Dec 25, 2006 9:40 am
Location: Seattle

Linux Mint is funded by ads and donations.
 

Re: Easy Auto Gen quote's for email signature

Postby antiquexray on Mon Feb 19, 2007 2:22 pm

marcus0263 wrote:4) Make it executable



Question...how does one make a file executable?
User avatar
antiquexray
Level 5
Level 5
 
Posts: 596
Joined: Sat Nov 18, 2006 6:04 pm
Location: Albert Lea Minnesota USA

Postby Fragadelic on Mon Feb 19, 2007 4:21 pm

chmod a+x filename

This will make it executable for everyone.
User avatar
Fragadelic
Level 4
Level 4
 
Posts: 469
Joined: Wed Nov 15, 2006 11:05 am
Location: Canada

Re: Easy Auto Gen quote's for email signature

Postby marcus0263 on Tue Feb 20, 2007 12:22 am

antiquexray wrote:
marcus0263 wrote:4) Make it executable



Question...how does one make a file executable?


Code: Select all
chmod 755 filename.sh



Here's a quick reference chart, actually doing it by the numbers is the easiest. Once you get used to it it's a snap.

Code: Select all
Number     Read (R)     Write (W)     Execute (X)
0                      No           No                No
1                      No           No                Yes
2                      No           Yes               No
3                      No           Yes               Yes
4                     Yes           No                 No
5                     Yes           No                 Yes
6                     Yes           Yes                No
7                      Yes           Yes                Yes


So, for example:

777 is the same as rwxrwxrwx

755 is the same as rwxr-xr-x

666 is the same as rw-rw-rw-

744 is the same as rwxr--r--
User avatar
marcus0263
Level 4
Level 4
 
Posts: 362
Joined: Mon Dec 25, 2006 9:40 am
Location: Seattle

Postby clem on Tue Feb 27, 2007 12:08 pm

User avatar
clem
Level 15
Level 15
 
Posts: 5541
Joined: Wed Nov 15, 2006 8:34 am


Return to Tutorials / Howtos

Who is online

Users browsing this forum: Darcy and 14 guests