LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 04-04-2008, 09:41 PM   #1
penguinboy08
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, 01:14 AM   #2
raskin
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (http://nixos.org)
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, 01:26 AM   #3
penguinboy08
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, 05:54 PM   #4
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 233Reputation: 233Reputation: 233
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
Quote:
The Noobs Guide to Bash-Scripting
should be:
Quote:
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 http://www.catb.org/jargon/html/N/newbie.html & 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
Quote:
Enough talking, lets get started!
should be:
Quote:
Enough talking, let's get started!

Quote:
check out it's man page:
should be:
Quote:
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
Quote:
For instance, lets say
should be:
Quote:
For instance, let's say

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

Part 2 content
Quote:
What the fart is a variable?
could just as well be:
Quote:
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:
Code:
example_variable="example_value"
echo $example_variable
would become:
Code:
VAR="example_value"
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
Quote:
order to be review and compiled
should be:
Quote:
order to be reviewed and compiled

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

Quote:
hesitate to email me,
should be:
Quote:
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
Quote:
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 . . .
 
  


Reply


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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:23 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration