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 06-28-2013, 08:00 AM   #1
vaibhavatalkar
LQ Newbie
 
Registered: Sep 2012
Location: bhopal
Distribution: RHEL
Posts: 28
Blog Entries: 2

Rep: Reputation: 0
Confused About shell script


hiii friend

i am confused which shell scripting i chose to learn!!!!!!!
different type of shell are available like bash,perl,python, ,csh,tcsh,kron etc.

i wanted to learn shell script that is mostly used by network administrator to configuer network.because i am a beginner of linux network admin..

pls give me a proper suggestion to choose about Shell Script.

thanks in advance
 
Old 06-28-2013, 08:35 AM   #2
jazz5150
LQ Newbie
 
Registered: Jun 2013
Location: NL
Distribution: Kali-Linux, Debian
Posts: 20

Rep: Reputation: 15
Most Shell scripting is done in a Bash shell these days.
Perl and Python (and Ruby and ..) are scripting languages but not shell scripting. Shell scripting refers to writing a script with the tools / language available in the shell itself. Python and Perl are external languages that exist independent from the shell.

A Linux admin can and will use any and all scripts that fit the job. Bash, Python, Perl and Ruby are obvious starting points to learn scripting.
 
Old 06-28-2013, 08:46 AM   #3
mina86
Member
 
Registered: Aug 2008
Distribution: Debian
Posts: 517

Rep: Reputation: 229Reputation: 229Reputation: 229
Technically, Perl and Python are not shell scripts.

I wouldn't waste time for csh, tcsh and I have no idea what “kron” is. Did you mean ksh? In that case I wouldn't waste time for it either.

It seems that many people no longer look at Perl favourably, so some folks may look at you weird if you tell them you are learning Perl. I personally have put Perl and Python in pretty much the same category.

But with what we're left, Perl, Python and Bash, the last one is something completely different then the first two. Bash is shell after all, and to be honest, you should know both shell scripting and Perl/Python, so I'd recommend learning (Bash and Perl) or (Bash and Python).

Having said that, I would actually recommend to keep it pure POSIX shell. You can find description of POSIX shell at http://pubs.opengroup.org/onlinepubs...idx/shell.html (the site uses frames and http://pubs.opengroup.org/onlinepubs/000095399/ gets you to the main page). For Bash there's Advanced Bash-Scripting Guide).

For Python see http://python.org/doc/ and finally for Perl there's a list of some books. Learning Perl is a good read.
 
Old 06-29-2013, 12:08 AM   #4
vaibhavatalkar
LQ Newbie
 
Registered: Sep 2012
Location: bhopal
Distribution: RHEL
Posts: 28

Original Poster
Blog Entries: 2

Rep: Reputation: 0
Question what would u say

some pepple tell me perl is the best choice..because perl is easy and as similar as c++ language.because i hav no more time to learn both bash and perl...
what would u say about perl..
 
Old 06-29-2013, 01:33 AM   #5
jazz5150
LQ Newbie
 
Registered: Jun 2013
Location: NL
Distribution: Kali-Linux, Debian
Posts: 20

Rep: Reputation: 15
Perl is good, there is a large community and a lot of free online information.
Perl is however not similar to C++. And I mean really, really not similar.

So, to learn scripting / programming Perl is a good a choice.

If you want to be a Linux Network Admin Shell scripting is mandatory imho. It is the quick and dirty way to make things happen when you're in a hurry.

So if that is your goal: take the time to learn both - it will help a great deal to land a job.
 
Old 06-29-2013, 02:51 AM   #6
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,862
Blog Entries: 1

Rep: Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869
Generally, when you write a script, and start it with #!/bin/sh you cannot tell what shell will actually interpret it: ksh, bash, dash or other. So test it with dash: it is a minimalist shell with minimal flexibility and no extensions.
 
1 members found this post helpful.
Old 06-29-2013, 04:13 AM   #7
kooru
Senior Member
 
Registered: Sep 2012
Posts: 1,385

Rep: Reputation: 275Reputation: 275Reputation: 275
Absolutely you have to learn bash/ksh scripting.
After, if you want/can, perl too.
 
1 members found this post helpful.
Old 06-29-2013, 01:00 PM   #8
vaibhavatalkar
LQ Newbie
 
Registered: Sep 2012
Location: bhopal
Distribution: RHEL
Posts: 28

Original Poster
Blog Entries: 2

Rep: Reputation: 0
Wink

ok you mean to say firstly i learn bash and than perl to..
that both are helpful for me.
k jazz and mina,kooru thank u so much for the suggestion..
pls if u have any tutorial or any document in a soft copy or any link to learn bash and perl
pls send me
my Mail ID - vaibhavatalkar@gmail.com

thanks
 
Old 06-29-2013, 03:14 PM   #9
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,635

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by vaibhavatalkar View Post
ok you mean to say firstly i learn bash and than perl to..
that both are helpful for me.
k jazz and mina,kooru thank u so much for the suggestion..
pls if u have any tutorial or any document in a soft copy or any link to learn bash and perl
Spell out your words, please. And you don't have to learn anything in any particular order...learn bash first, or perl, or any other language...just pick one. Go to Google, and look up any of the many thousands of easily-found tutorials/documents, and read them. Do some exercises, write scripts, and figure things out. That's how you learn. There is a link to bash scripting tutorials in my posting signature, and many more you can find with a quick Google search.
Quote:
pls send me
No...we are not going to email you tutorials. This is a community forum, not the place to come for personalized, one-on-one email support/training.
 
1 members found this post helpful.
Old 06-29-2013, 03:40 PM   #10
jazz5150
LQ Newbie
 
Registered: Jun 2013
Location: NL
Distribution: Kali-Linux, Debian
Posts: 20

Rep: Reputation: 15
A hint with regard to Bash: look at TB0nes signature..
 
Old 06-30-2013, 12:40 AM   #11
vaibhavatalkar
LQ Newbie
 
Registered: Sep 2012
Location: bhopal
Distribution: RHEL
Posts: 28

Original Poster
Blog Entries: 2

Rep: Reputation: 0
Smile

ok boss ....
i'll keep it in mind.
 
Old 07-01-2013, 11:39 AM   #13
vaibhavatalkar
LQ Newbie
 
Registered: Sep 2012
Location: bhopal
Distribution: RHEL
Posts: 28

Original Poster
Blog Entries: 2

Rep: Reputation: 0
Wink

thank u very much chrism01
 
  


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
Confused About Shell Script Capabilities carlosinfl Programming 2 04-14-2013 09:44 PM
How to pass command line arguments from one shell script to another shell script VijayaRaghavanLakshman Linux - Newbie 5 01-20-2012 09:12 PM
[SOLVED] A bit confused with && and || operators in shell script luvshines Programming 6 11-24-2009 12:37 PM
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 12:33 PM.

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