Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 04-04-2008, 10:41 PM   #1
LQ Newbie
Registered: Apr 2008
Posts: 10

Rep: Reputation: 0
Post Noobs Guide to Bash-Scripting

I've added more to my series of bash-scripting tutorials! Hopefully this can help some people get on the right track, I've tried to start from the very basics, and we're progressing on to the more interesting stuff.

Part 1

Part 2
Part 3

I will be updating this post as I write some more parts! Comments are much appreciated.
Old 04-05-2008, 02:14 AM   #2
Senior Member
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (
Posts: 1,900

Rep: Reputation: 68
Well, where you explain "for", you could also explain its use with explicit list. Or $(seq 1 10) .. Because the fact that for is applicable not only to * can be a small stumbling block for beginning shell programmers.
Old 04-06-2008, 02:26 AM   #3
LQ Newbie
Registered: Apr 2008
Posts: 10

Original Poster
Rep: Reputation: 0
Yea, thanks for the tip. I'll include that when I next get the chance.
Old 05-12-2008, 06:54 PM   #4
Senior Member
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
Thumbs up Great work

Over all, v.v.v. good.
Here are some suggestions.
Hope none are too harsh; remember, I wouldn't have bothered if I didn't think your piece is worth the trouble.

Title typos
The Noobs Guide to Bash-Scripting
should be:
The Noob's Guide to Bash-Scripting

Title content
Although I am in a tiny minority here, I think "noob" is a totally offensive term, see & realize that in the "British public-school" context, there may have been an implied right of upperclassmen to sodomize the newbie. Compare "fresh fish" in The Shawshank Redemption.

Part 1 typos
Enough talking, lets get started!
should be:
Enough talking, let's get started!

check out it's man page:
should be:
check out its man page:

Part 1 content
Personally, I would explain in more depth:
shebang (also called a hashbang, hashpling, or pound bang) both the nomenclature & the reason. I wouldn't be embarrassed to reference the Wikipedia.

Why chmod & ./$SCRIPTNAME are necessary.

Part 2 typos
For instance, lets say
should be:
For instance, let's say

Arguments can be easily accessed in the script, they are automatically assigned to a variable.
should be:
Arguments can be easily accessed in the script, they are automatically assigned to variables.

Part 2 content
What the fart is a variable?
could just as well be:
WTF is a variable?

"Variables can be created very easily:" . . .
I'd be happier if you stuck w/ the bash convention of capitalizing variable names & didn't model the, to a shell scripter, abominable long variable names from the C family:
echo $example_variable
would become:
echo $VAR

"Along with the argument variables,"
You need to mention that argument variables are perversely called "parameters" in bash -- particularly in its man page.
(Thumbs up for calling them "arguments".)

Part 3 typos
order to be review and compiled
should be:
order to be reviewed and compiled

It's standard form is this:
should be:
Its standard form is this:

hesitate to email me,
should be:
hesitate to e-mail me,
I know, some think this is just a matter of taste; but AFAIAC, "email" is illiterate, because it implies the wrong pronunciation of the word.

Part 3 content
In our scenario we are a programmer working with a smallish team of like-minded programmers.
Cool, the royal/editorial "we" correctly used.

And of course, I hope I have proofed & spell checked this enough . . .


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
looking for a bash for absolute beginners guide dasy2k1 Linux - Newbie 8 11-11-2016 01:50 PM
Link to basic bash scripting e-guide envisage Programming 10 02-03-2008 05:34 AM
Shell scripting guide / tutorial rockymaxsource Linux - General 6 06-01-2007 04:02 AM
Guide on how to install RealPlayer for Debian/Xandros/Redhat/Fedora (for noobs) jdruin Linux - Software 6 06-06-2005 02:14 AM
Guide on how to diagnoise RealPlayer not playing website audio (for noobs:-)) jdruin Linux - Software 1 10-26-2004 07:59 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:15 PM.

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