![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Rules & FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Include PERL script with in the unix shell script | ganapati | UNIX for Dummies Questions & Answers | 1 | 04-29-2008 09:18 AM |
| How to call a perl script from a shell script | anumkoshy | Shell Programming and Scripting | 2 | 08-30-2007 01:23 AM |
| How to Run a shell script from Perl script in Parent shell? | hifake | Shell Programming and Scripting | 16 | 08-28-2007 05:42 PM |
| Box A's perl script calling box B's shell script | new2ss | Shell Programming and Scripting | 1 | 09-13-2006 03:17 AM |
| Looping a perl script in a shell script | edkung | Shell Programming and Scripting | 8 | 10-04-2002 07:28 AM |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Diffrence b/w shell script and perl script
Hi,
Could anyone please tell me what are basic diffrence between a shell and a perl scipt i.e where to use shell scripting and where perl scripting? I want to know advantages of shell script over perl script and advantage of perl script over shell script. Thanks, Yogi |
| Forum Sponsor | ||
|
|
|
|||
|
It is simple. Whatever you can do in shell, do in shell. If there is no way to do it in shell then use perl. If either of the two above is a major performance problem, then resort to C.
This sounds like homework - we do not support homework here. |
|
|||
|
I only want to voice one minor bit of dissent to Jim's opinion. If your shell scripts are running slow, then go to Perl. If your "Perl Script" can't cope either go to Perl Monks to get help tuning it or hire a programmer.
Jim is accurate in stating that C is lightning fast, but Perl is about 20 times faster than most shell scripts and is usually adequate for most admin's. Plus, if written correctly, you can take a Perl script and move it to different architectures and it will still work. Not true of the C program, you will have to retain your source code and recompile on the new system. |
|
|||
|
Remember that shell scripts are portable as well and sometime a simple shell script is faster than perl script (ex. '#!/bin/ksh^Mcp "$1" "/tmp/x/$2"').
|
|||
| Google UNIX.COM |