Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   Bash / Shell Scripting (http://www.programmingforums.org/forum26.html)
-   -   Tutorials? (http://www.programmingforums.org/showthread.php?t=368)

kurifu Aug 17th, 2004 6:13 PM

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 ;)

Infinite Recursion Aug 17th, 2004 7:28 PM

I refer to this one and a few others occasionally...

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

Pizentios Aug 18th, 2004 8:41 AM

This is a good Place to start.

kurifu Aug 19th, 2004 1:28 PM

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.

Pizentios Aug 19th, 2004 1:30 PM

BASH scripting is really neat and i found it pretty easy to pick up.

Infinite Recursion Aug 19th, 2004 5:19 PM

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.

Pizentios Aug 19th, 2004 7:00 PM

Never Used Perl.

kurifu Aug 20th, 2004 5:51 PM

Perl is probably one of the best scripting languages to date, if you can wrap your mind around it...

clifford.will Aug 25th, 2004 8:01 PM

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 :D ... 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

Pizentios Aug 26th, 2004 9:12 AM

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.


All times are GMT -5. The time now is 3:41 PM.

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