Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Aug 17th, 2004, 6:13 PM   #1
kurifu
Expert Programmer
 
kurifu's Avatar
 
Join Date: Jul 2004
Location: Halifax, Nova Scotia (Canada)
Posts: 784
Rep Power: 5 kurifu is on a distinguished road
Send a message via ICQ to kurifu Send a message via MSN to kurifu
Anyway as of recently I am looking at finally setting up my crontab so that I can manage all of the mundane tasks I tend to do by hand once a week

ie: updating software, updating my slocate database, prelinking executable files, rotating logs, and managing system status reports, etc....

Thing is in order to do this I want to be able to script the commands that are being executed to run and respond in very specific circumstances... for instance if I am running on battery power I do not want slocate to execute. And if something fails I want an email sent to my inbox giving me the information I need to know about the failure...

Of course the best way to do this is to use Perl/PHP/or BASH... and since I know all but BASH I figured now would be just as good a time as any to learn how to use it so that I can nicely configure my crontab.

So at long last I am wondering if anyone recommends any good short tutorials? before I go on figureing it all out the hard way
__________________
Clifford Matthew Roche <geek@cliffordroche.com>
Web Hosting: http://www.crd-hosting.com
Consulting: http://www.crdev-consulting.com
kurifu is offline   Reply With Quote
Old Aug 17th, 2004, 7:28 PM   #2
Infinite Recursion
Programming Guru
 
Infinite Recursion's Avatar
 
Join Date: Jul 2004
Location: United States
Posts: 3,467
Rep Power: 8 Infinite Recursion is on a distinguished road
Send a message via MSN to Infinite Recursion Send a message via Yahoo to Infinite Recursion
I refer to this one and a few others occasionally...

http://www.complex-ite.net/tutorials/shellscript/HTML/
__________________
http://jasonpowers.net

"There are a thousand hacking at the branches of evil to one who is striking at the root."
Infinite Recursion is offline   Reply With Quote
Old Aug 18th, 2004, 8:41 AM   #3
Pizentios
Programming Guru
 
Pizentios's Avatar
 
Join Date: May 2004
Location: Brandon, Manitoba, Canada
Posts: 2,023
Rep Power: 7 Pizentios is on a distinguished road
Send a message via ICQ to Pizentios Send a message via MSN to Pizentios
This is a good Place to start.
__________________
Profanity is the one language that all programmers understand.

Check out my Blog <---updated Nov 30 2007!
Pizentios is offline   Reply With Quote
Old Aug 19th, 2004, 1:28 PM   #4
kurifu
Expert Programmer
 
kurifu's Avatar
 
Join Date: Jul 2004
Location: Halifax, Nova Scotia (Canada)
Posts: 784
Rep Power: 5 kurifu is on a distinguished road
Send a message via ICQ to kurifu Send a message via MSN to kurifu
Heh, thanks guys

Actually i decided that I was going to go with Perl. I have not really had a chance to work with Perl a whole lot and would like to get better at dealing with it so I am going to write all my scripts in the wonderful language that is Perl.

But no worries, you're posts are not in vain since I really would like to learn BASH scripting anyway.
__________________
Clifford Matthew Roche &lt;geek@cliffordroche.com&gt;
Web Hosting: http://www.crd-hosting.com
Consulting: http://www.crdev-consulting.com
kurifu is offline   Reply With Quote
Old Aug 19th, 2004, 1:30 PM   #5
Pizentios
Programming Guru
 
Pizentios's Avatar
 
Join Date: May 2004
Location: Brandon, Manitoba, Canada
Posts: 2,023
Rep Power: 7 Pizentios is on a distinguished road
Send a message via ICQ to Pizentios Send a message via MSN to Pizentios
BASH scripting is really neat and i found it pretty easy to pick up.
__________________
Profanity is the one language that all programmers understand.

Check out my Blog <---updated Nov 30 2007!
Pizentios is offline   Reply With Quote
Old Aug 19th, 2004, 5:19 PM   #6
Infinite Recursion
Programming Guru
 
Infinite Recursion's Avatar
 
Join Date: Jul 2004
Location: United States
Posts: 3,467
Rep Power: 8 Infinite Recursion is on a distinguished road
Send a message via MSN to Infinite Recursion Send a message via Yahoo to Infinite Recursion
I'd like to switch from BASH a bit and do some Perl myself... I need to brush up on Perl some more... I don't use it as often as I use BASH.
__________________
http://jasonpowers.net

"There are a thousand hacking at the branches of evil to one who is striking at the root."
Infinite Recursion is offline   Reply With Quote
Old Aug 19th, 2004, 7:00 PM   #7
Pizentios
Programming Guru
 
Pizentios's Avatar
 
Join Date: May 2004
Location: Brandon, Manitoba, Canada
Posts: 2,023
Rep Power: 7 Pizentios is on a distinguished road
Send a message via ICQ to Pizentios Send a message via MSN to Pizentios
Never Used Perl.
__________________
Profanity is the one language that all programmers understand.

Check out my Blog <---updated Nov 30 2007!
Pizentios is offline   Reply With Quote
Old Aug 20th, 2004, 5:51 PM   #8
kurifu
Expert Programmer
 
kurifu's Avatar
 
Join Date: Jul 2004
Location: Halifax, Nova Scotia (Canada)
Posts: 784
Rep Power: 5 kurifu is on a distinguished road
Send a message via ICQ to kurifu Send a message via MSN to kurifu
Perl is probably one of the best scripting languages to date, if you can wrap your mind around it...
__________________
Clifford Matthew Roche &lt;geek@cliffordroche.com&gt;
Web Hosting: http://www.crd-hosting.com
Consulting: http://www.crdev-consulting.com
kurifu is offline   Reply With Quote
Old Aug 25th, 2004, 8:01 PM   #9
clifford.will
Newbie
 
Join Date: Aug 2004
Location: Florida
Posts: 11
Rep Power: 0 clifford.will is on a distinguished road
Actually, if you want to learn another language, learn Python ... it's more stable than Perl, at least as far as the language itself is concerned ... Perl gets updated too often IMHO, and it tends to incorporate a lot of (really) bad code -- hard to read/understand .... plus, when the language itself gets updated, things suddenly break .... had it happen a few times too many. Python has a good support community and is fairly easy to learn / understand. The only oddity about it is that you have to be meticulous about your code indentation as the language uses that to determine what block of code belongs to which function/if/for etc. Once you get used to that, the rest of it flows relatively easily. If you do go the Python route, I suggest getting a copy of O'Reilly's Python handbook .... it's a small paperback book, and costs about US$15 ... I've used my copy so much that I wore out the spine in it ... it's very handy to have when you're learning the language, and even after you've learned it and need to refer back to some call that you don't normally use.

Python Home

Vaults of Parnassus --- Python modules galore
clifford.will is offline   Reply With Quote
Old Aug 26th, 2004, 9:12 AM   #10
Pizentios
Programming Guru
 
Pizentios's Avatar
 
Join Date: May 2004
Location: Brandon, Manitoba, Canada
Posts: 2,023
Rep Power: 7 Pizentios is on a distinguished road
Send a message via ICQ to Pizentios Send a message via MSN to Pizentios
Quote:
The only oddity about it is that you have to be meticulous about your code indentation as the language uses that to determine what block of code belongs to which function/if/for etc.
Heh, that's why it's such a good language to learn on, it's OO and it teaches you good programming habbits.
__________________
Profanity is the one language that all programmers understand.

Check out my Blog <---updated Nov 30 2007!
Pizentios is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 7:18 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC