LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-20-2007, 11:32 AM   #1
Grife
Member
 
Registered: Oct 2006
Location: Finland
Distribution: openSUSE
Posts: 89

Rep: Reputation: 15
shell scripting guides?


I'd like to learn some shell scripting to speed up several tasks I find myself repeating over and over again, like copying several directories with update attribute to external harddrive. Could you recommend any good starting points in the internet?
 
Old 03-20-2007, 11:40 AM   #2
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
http://tldp.org/guides.html

Try "Bash Guide for Beginners" and "Advanced Bash Programming" (bash is the shell most distros use).
 
Old 03-20-2007, 03:47 PM   #3
omnio
Member
 
Registered: Feb 2007
Location: $HOME
Distribution: Hardened Gentoo
Posts: 66
Blog Entries: 1

Rep: Reputation: 16
Those mentioned by pljvaldez are the best. For a beginner, these may be useful too:

http://www-128.ibm.com/developerwork...ry/l-bash.html
http://linuxcommand.org/writing_shell_scripts.php
http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html
 
Old 03-20-2007, 11:02 PM   #4
cfaj
Member
 
Registered: Dec 2003
Location: Toronto, Canada
Distribution: Mint, Mandriva
Posts: 221

Rep: Reputation: 31
Quote:
Originally Posted by Grife
I'd like to learn some shell scripting to speed up several tasks I find myself repeating over and over again, like copying several directories with update attribute to external harddrive. Could you recommend any good starting points in the internet?

You can find a list of good resources on the web at http://cfaj.freeshell.org/shell/resources.shtml.

 
Old 03-21-2007, 03:20 AM   #5
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: Mint, Armbian, NetBSD, Puppy, Raspbian
Posts: 3,515

Rep: Reputation: 239Reputation: 239Reputation: 239
which shell?
hint:

#!/bin/ksh -u
#!/bin/bash -u

or

typset -nounset # same as -u but more explicit placement


will cause an error if you try to use an unbound variable. This
can save a lot of pain when you have mis-typed a variable name.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Shell Scripting: Getting a pid and killing it via a shell script topcat Programming 15 10-28-2007 02:14 AM
Shell scripting help SpLaSh212 Linux - Newbie 5 02-23-2007 12:18 PM
How to get better at shell scripting? Micro420 Programming 9 11-08-2006 12:10 AM
teaching shell scripting: cool scripting examples? fax8 Linux - General 1 04-20-2006 04:29 AM
shell interface vs shell scripting? I'm confused jcchenz Linux - Software 1 10-26-2005 03:32 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration