The Upcoming Version of Linux Shell Scripting Tutorial v2.0

by on September 24, 2009 · 26 comments· LAST UPDATED September 24, 2009

in

I've been working on the Linux Shell Scripting Tutorial v.2.0 for some time and now the updated version licensed under "Creative Commons Attribution Noncommercial Share Alike 3.0 Unported" of the same available in wiki format. It will contain a few significant changes from the previous versions of the tutorial, which includes a new topics, grammar & typo fixing and new sys admin related scripts.

The first eight updated chapters are available online at the following URL:

http://bash.cyberciti.biz/guide/Main_Page

I'm planning to add few more chapters:

  • Shell Functions and Libraries.
  • Shell Array.
  • Writing interactive scripts.
  • Quick tour of filters such as cut, awk, sed, grep, cut, paste and sort commands.
  • Date and strings manipulation.
  • Common sys admin tasks automation such as file backup, database backup, user management, ftp, ssh, remote login, server monitoring, security, firewall, BIND dns management, web server management scripts etc

Hope you will enjoy new tutorial in wiki format! What you like, do not like or anything you feel I should improve on. If you see my mistake, typos or know of a better way to accomplish same task, please let me know. Add your feedback in the comments below.

Survey: Help Us Make nixCraft Better Site

As the reader of this site, you are our most important critic and commentator. I value your opinion and want to know what I'm doing right, what I could do better. Please take our survey. The questionnaire in total should not take more than 5 minutes time. As a thank-you for participating in the survey, you can enter a drawing for a chance to win a $100 VISA Gift Card. The gift card we are using is internationally accepted (can be used worldwide).

Please click here to take survey.

Thank you.

TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!
1 Philippe September 24, 2009 at 11:24 am

Hi Vivek,
Great idea!
A wiki is a more appropriate way to build knowledge and share it – than a blog.
The pity is I cannot create an account to edit pages when I see a typo, (and I saw one ;-) ) .
as I am allowed on Wikipedia, for instance.
(I think you know my motivation and collaboration up to now on your site).

– Philippe

2 nixCraft September 24, 2009 at 11:55 am

Hi Philippe,

Great suggestion. I’m new to Mediawiki itself. I’ve just updated permission and now you can create an account to edit pages. This was disabled to due to spam issue. I will also get installed an anti spam extensions.

3 Burrst September 24, 2009 at 11:58 am

Your tutorial is wonderful waste of time. All you need is bash man page.

4 nixCraft September 24, 2009 at 12:38 pm

@ Burrst: Please, enlighten me.

5 Philippe September 24, 2009 at 12:38 pm

To Burrst
I actually disagree with your sentence.
- The current bash man page does not contains all this information, I mean examples and tutorial – And I have been reading bash man page when needed.
- you cannot edit bash man page yourself
- I have been using this site for months, and although the subject is common to hundreds of sites, I found it useful.

Of course, this may seem to be duplicated work with GNU bash manual and tutorial pages, or some specific sites such as the BASH HACKERS Wiki
http://bash-hackers.org/wiki/doku.php

BTW, your opinion is worth any other,
but you could have put it a more respectful and polite way,
at least argumenting in details what you think and why,
explaining and sharing us what best tutorials you know and recommend.
(Tutorial, not man pages).

6 ryan September 24, 2009 at 1:39 pm

Wonderful tutorial,though! Please keep them coming,i suggest you to include a section called Linux filters ,where you first cover essential commands like grep,pgrep,egrep,cut,paste,sort,diff,sed\awk\gawk,uniq ,wc,perl head,tail,tailf,more,less and so on…well to be honest id be more than willing to write a linux filter tutorial if it can be posted here :)

7 Kimura September 24, 2009 at 3:24 pm

Thank you for tutorial. ;)

8 manoj jasawat September 25, 2009 at 5:16 am

how to install——————– lan driver rtl8169 in rhel5……..

9 nixCraft September 25, 2009 at 7:11 am

@manoj, this is offtopic, use the forum ( http://nixcraft.com) for all other questions.

@ ryan, you can register at wiki and create articles.

HTH.

10 marc September 25, 2009 at 9:37 am

There is any way to download all the tutorial so I can read it while on the subway?

thanks

11 nixCraft September 25, 2009 at 10:48 am

@ marc,

Look at “Create a book” on left side navigation. Add pages and when done click on “Show book”. You will get an option to download it as PDF or Order as a printed book from PediaPress.

12 Dean Thomas September 25, 2009 at 11:14 am

Hey,

Is a good idea, Man pages are great, but it’s nice to have a book written by someone who speaks the same language, if that makes sense… man can be very daunting to newbies, online guides like this are great.

I have a couple of articles on database backup, feel free to use them in your guide!

Coding Articles

Keep up the good work!
D

13 swap4u September 25, 2009 at 11:38 am

Feel I want to comment on @Burrst’s comment – you’re an ASS.

The author took the time to write a good tutorial. At least give constructive comment.

Swapnil

14 Philippe September 25, 2009 at 12:51 pm

[ e-mail new password ] function does not work on Wiki – ;-)

15 nixCraft September 25, 2009 at 1:42 pm

@Philippe,

I’ve configured mediawiki to send an email via mail.nixcraft.net. Let me know if you’ve any more problem.

16 kgas September 25, 2009 at 3:10 pm

The format is better than your previous one and not gone thro’ all pages.
@Burrest : If you are knowledgeable feel free to help the community. Lame comment will not help any one.

17 marc September 25, 2009 at 3:29 pm

If there is any way to download it as pdf or book-like package it will be very nice to read on the subway.

great job, thanks

18 Mike September 25, 2009 at 9:08 pm

Looks like a good start and I added it to my bookmarks. I was curious about what Linux distributions you linked but the link is not working. A good Linux distribution for testing bash scripts would be It is only 10Meg so dial up is feasible.

19 nixCraft September 25, 2009 at 9:22 pm

@ marc

Okay, I’ve uploaded PDF version here

@Mike, It should work with any Linux distro as long as it shipped with BASH v3.x.x or above.

20 Philippe September 25, 2009 at 10:57 pm

Vivek,

Again, it seems to be a great idea, content is nice and container (Wiki) is usable,
we all want to contribute and share,
so why wouldn’t we want to add/merge it to the existing Wikipedia pages,
- http://en.wikipedia.org/wiki/Bash
or make/merge an existing Wikibook?
- http://en.wikibooks.org/wiki/Bourne_Shell_Scripting

I don’t mean to be rude,
but Wikipedia may last a little longer than any privately individually owned web site,
don’t you think?

(Not mentionning again Bash Hackers wiki, which is awesome)

– Philippe

21 Philippe September 25, 2009 at 11:06 pm

See, I think there are already a bunch of good sites,
I think energies should merge on Wikipedia,
there are quite a lot of pages on the subject:
- http://tldp.org/LDP/Bash-Beginners-Guide/html/index.html
- http://tldp.org/LDP/abs/html/index.html (Advanced Bash-Scripting Guide)

And here a list of all sources:
The Comprehensive List of bash Reference Documentation and Examples:
http://www.bashcookbook.com/bashinfo/

and the reference to me [again] http://bash-hackers.org/wiki/doku.php

– Philippe

22 nixCraft September 25, 2009 at 11:29 pm

Philippe,

I really don’t have answers to all your questions. But, this tutorial was created way back in 1999. It was featured twice on Slashdot. This is just an updated version to 1.05. Yes, those are very good sites. The Internet is good place for sharing, gaining knowledge, and increasing competition. Competition (multiple sites sharing info) is good for consumers.

HTH.

23 marc September 26, 2009 at 12:31 am

lots of thanks.

English it’s not my mother thong, but if i find a tipo i’report it to you.

:)

24 mekjs2001 September 28, 2009 at 8:49 pm

For the …/Getting_User_Input_Via_Keyboard, I’d point out what the last variable looks like when more than 3 values are entered. You also might want to introduce the IFS concept here.

25 Pravin Bari October 6, 2009 at 6:56 am

Very very useful guide specially form beginners. Such guides really help people like me. Thanks very much Vivek.

Keep writing….

26 pasty! December 2, 2009 at 12:47 pm

Fantastic tutorial so far – especially like the dialog chapters…..
makes any bash script very professional.
Especially when trying to get non unix users doing admin tasks.

Good work.

Comments on this FAQ are closed. If you'd like to continue the discussion on this topic, you can do so at our forum.

Previous post:

Next post: