Learn bash shell scripting


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Learn bash shell scripting
# 1  
Old 09-04-2013
Learn bash shell scripting

I do not know shell scripting. But at work place, I have got an in and out shell scripting task. I just need to understand a very big script. Is there any tool in which I can place the script and it can tell me the meaning of the whole script?
# 2  
Old 09-04-2013
I doubt...
That said, a shell script is nothing more than commands you would normally type at prompt put in a file to be executed in batch mode...
# 3  
Old 09-04-2013
Quote:
Originally Posted by vbe
I doubt...
That said, a shell script is nothing more than commands you would normally type at prompt put in a file to be executed in batch mode...
I completely agree. I don't think there are any shorcuts like what you want, in order to learn (and I emphasize the word learn) shell scripting.
I would suggest you to take a look at The Linux Command Line, which I believe it's the best book to learn Linux and shell scripting from scratch. You can download it for free here (the latest edition was published a month ago).
# 4  
Old 09-05-2013
Quote:
Originally Posted by lg123
Is there any tool in which I can place the script and it can tell me the meaning of the whole script?
Yes, there is: it is called "scripting learning device", or, by its old name, "book". I suggest you get one and start reading.

Make sure that you are learning the right shell, though. In the first line of the script there should be a "shebang" identifying the shell to use, for example:

Code:
#! /usr/bin/bash
<...rest of the script....>

Widespread alternatives to this would be "ksh" (Korn Shell) or "sh" (either Bourne shell or the systems default shell, whatever that may be).

Most of the syntax is the same in these shells (they are all derived from the Bourne shell) but in some details they are different.

I hope this helps.

bakunin
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to learn UNIX shell scripting?

Hi Guys, I know basic command of unix and basic programming of unix as like using for loop, while loop, if..else, case statement etc. then how to learn unix shell scripting as well as use also. (1 Reply)
Discussion started by: aaditya321
1 Replies

2. Shell Programming and Scripting

Need a good book to learn UNIX Shell Scripting

I'm going to be starting a job in a month or so that I need to brush up on my Unix shell scripting skills. About 15 years ago, I took a college class for Unix shell scripting. I would like to find a good college book again, rather than just going to Amazon and just buying anything. This is... (2 Replies)
Discussion started by: dorlow
2 Replies

3. Shell Programming and Scripting

LEARN SHELL SCRIPTING BASICS

I am beginner to the SHELL SCRIPT and want to Learn SHELL SCRIPT Basics. This thread should help to all beginners who want to learn SHELL SCRIPT *** Thanks in advance to those who will contribute on this thread *** Please guide me and all beginners... 1. Is there any good e-book... (3 Replies)
Discussion started by: sagarsbhandare
3 Replies

4. Shell Programming and Scripting

My PM has told me to learn shell scripting in 2 weeks , how should I start?

My PM has told me to learn shell scrting in 2 weeks , how should I start?:confused::confused::confused::confused: (1 Reply)
Discussion started by: manalisharmabe
1 Replies

5. Shell Programming and Scripting

Should I learn bash scripting or is it going obsolete?

Hi folks, I'm a CS students enrolled in a sysadmin class where we've been covering bash scripting for the past few weeks. I have prior knowledge in java, c++, c#, python,and some scripting languages like asp.net w/c# and php. This bash stuff seems pretty neat and a bit different than what I am... (9 Replies)
Discussion started by: KalEl
9 Replies

6. UNIX for Dummies Questions & Answers

good book to learn korn shell scripting

which is a gud book to learn advanced korn shell scripting? i know the basic shell scripting (1 Reply)
Discussion started by: shishirkotkar
1 Replies

7. Gentoo

cpu%/mem% usage, scripting, dzen2: howto learn bash the hard way

I am trying to write a small (and rather simple) script to gather some info about the system and piping it to dzen2 first, i want to explain some things. I know i could have used conky, but my intention was to expand my knowledge of bash, pipes and redirections inside a script, and to have fun... (14 Replies)
Discussion started by: broli
14 Replies

8. Shell Programming and Scripting

Help- To learn shell scripting

Hello all, Could any one let me know where to find exercises(problems to solve) both simple and complex ones that would eventually help me learn Shell scripting.I'm just a beginner:o in shell scripting but would love to learn more.. Thanks, Triji (2 Replies)
Discussion started by: tj23
2 Replies

9. Shell Programming and Scripting

Bash shell Scripting help

wwww wwwwwwww wwwwwwwwwwwww (0 Replies)
Discussion started by: keyvan
0 Replies

10. Shell Programming and Scripting

What is a good place to learn basic shell scripting? Thanks!

See the title. Originally wasn't going to type anything but I need a message of at least 10 characters! :cool: (2 Replies)
Discussion started by: deutchap6verse5
2 Replies
Login or Register to Ask a Question