perl as lanuage of shells in unix

hi, do shells in unix understand the language of perl?

learning perl will make u a ultimate shell programmer?

thanks

No. Perl understands Perl.

You will see in many perl scripts that the first line of code is often something along the lines of :

#!/usr/bin/perl

This tells the shell script to use the perl parser for the perl script.

No. While Perl does contain a lot of similiarities to shell scripting, it is in it's own little world. If you want to be an ultimate shell scripter, then you should pick a popular shells such as Korn Shell (ksh) (heartily endorsed by Perderabo) or Bourne Again Shell (bash) and have at it. There are many reference guides on the net to shell scripting.

which is the more widely use shell?

I would venture to guess Korn Shell and bash. But the Bourne Shell (sh) is just about universal across most Unices.

Use the Bourne shell. Avoid csh and its associates for programming (at least). On some systems (like SGI) sh is now a link to ksh, and you have to say #!/bin/bsh to get the unadorned Bourne shell. But if you want ksh's extended features, some of which are quite useful, make sure every platform that will run your program has it.

For interactive use, I prefer zsh (and have for around 8 years), but zsh changes the test syntax (from [ -f fred.txt ] to [[ -f fred.txt ]]) among other things, so for programming, I still use sh.

to be completely honest with you i would learn perl, vi, and 2 of the basic shells (sh & ksh).

sh = is on every style of unix and or linux.
ksh = i like this one over any of the other ones. it doesnt have all the bells and whistles but it does the job everytime i need something done.

perl = consider it an extention to shell scripting in general. sometimes you will want to use sed/awk/grep/ls and so on and other times you will want to use perl to do those things. knowing both gives you the basic artillery you will be able to take anywhere with you.

shell scripting = a basic function i think everyone and there fetus should learn. altho i am not an uber shell scripter like some of the chaps on here, i know the basics adn a little more and it will get you far enuff to be able to bulit off of that.

Pretty good advice. Until recently, I was using Perl and Ruby for just about everything. But a guy at work was doing things in shell scripts (using csh :eek: ), so I have moved back more toward sh/awk/sed/... for bits that don't need a sophisticated data structure, i.e., about half of my scripting.