| | |
Advantage of using shell(ksh/bash etc) compared to perl?
![]() |
•
•
Join Date: May 2006
Posts: 1
Reputation:
Solved Threads: 0
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
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
•
•
Join Date: May 2004
Posts: 178
Reputation:
Solved Threads: 10
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.
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.
•
•
Join Date: Jul 2005
Posts: 78
Reputation:
Solved Threads: 3
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.
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.
Web developers and software programmers.
![]() |
Similar Threads
- Some commands not working after ssh into a shell (KSH) (Shell Scripting)
- what is the best scripting language? (Computer Science)
- where to start with perl? (Perl)
- Bourne / Bash Unix/Linux shell scripting tutorial (Shell Scripting)
- Linux/UNIX (*nix Software)
Other Threads in the Perl Forum
- Previous Thread: LWP::UserAgent and Proxy Authentication
- Next Thread: How to modify this perl script and make it running in Linux , solaris and windowXP?
| Thread Tools | Search this Thread |






