Advantage of using shell(ksh/bash etc) compared to perl?

Reply

Join Date: May 2006
Posts: 1
Reputation: Nisha R is an unknown quantity at this point 
Solved Threads: 0
Nisha R Nisha R is offline Offline
Newbie Poster

Advantage of using shell(ksh/bash etc) compared to perl?

 
0
  #1
May 25th, 2006
Hi,

I understand the advantages of using perl over other shell programming techniques like sh,ksh,bash etc. I understand that perl is very powerful and advanced.

But, here, i want to know, if there is any situation, where in, we prefer to use the usual shell programming over perl? Any performance gain? Or any other advantage? I know that Perl can act in many ways that shell scripts cannot, such as in cgi scripts. But as far as acting on the system and its files, or acting only locally, it seems that shell scripts are more powerful?

Thanks
Nisha
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 2,047
Reputation: Rashakil Fol is just really nice Rashakil Fol is just really nice Rashakil Fol is just really nice Rashakil Fol is just really nice 
Solved Threads: 139
Team Colleague
Rashakil Fol's Avatar
Rashakil Fol Rashakil Fol is offline Offline
Super Senior Demiposter

Re: Advantage of using shell(ksh/bash etc) compared to perl?

 
4
  #2
May 29th, 2006
There is pretty much no reason to use shell scripting if you're guaranteed that your environment will have perl, unless that's what you happen to prefer. Except for maybe some really small stuff.
All my posts may be redistributed under the GNU Free Documentation License.
Reply With Quote Quick reply to this message  
Join Date: May 2004
Posts: 178
Reputation: jim mcnamara is on a distinguished road 
Solved Threads: 10
jim mcnamara jim mcnamara is offline Offline
Junior Poster

Re: Advantage of using shell(ksh/bash etc) compared to perl?

 
0
  #3
Jun 5th, 2006
Ten lines of shell script is easier to maintain than 70 lines of perl.
It's also faster to develop.

Experienced sysadmins use shell scripts, then use perl/ruby/python when they cannot do whatever it is in shell coveniently or very well.

In practice what usually happens is that new sysadmins learn one thing really well and use it for everything. eg, perl or ksh. This practice is usually frowned upon in big companies where creating hard to maintain code is frowned upon. Hard to maintain code is what you often get when you push a facility to the very edge of it's capbilities - usually because you don't any other way to do it.
Reply With Quote Quick reply to this message  
Join Date: Jul 2005
Posts: 78
Reputation: chrisranjana is an unknown quantity at this point 
Solved Threads: 3
chrisranjana chrisranjana is offline Offline
Junior Poster in Training

perl vs Bash shell

 
0
  #4
Jun 20th, 2006
It all depends on what you are trying to do

Sometimes what takes 100 lines in shell to do can be achieved by using a simple perl module !

Sometimes a single bash shell command can do the job for you neatly

so it depends on the usage and user.
Chris, Director, Chrisranjana.com
Web developers and software programmers.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC