spliting a string.
am 06.04.2008 18:28:31 von deepak
hi everyone,
I'm new to shell script.Any one please clear me the following doubts:
1) Is Shell script executes faster than a perl script?
2) How to split a string with a delimiter(eg. \t) and store in an
array in shell script.
3) How do we execute a mysql query in shell script.
thanx in advance.
Re: spliting a string.
am 06.04.2008 18:48:48 von Johann Kappacher
deepak wrote:
> 1) Is Shell script executes faster than a perl script?
In most cases, perl uses functions instead of calling UNIX utilities.
Shell scripts depend on calling UNIX utilities because of limited
language capabilities. UNIX utilities are separate programs (=processes)
that need some time to start.
> 2) How to split a string with a delimiter(eg. \t) and store in an
> array in shell script.
This is simple stuff, please read a beginner's tutorial. You will see
enough examples. btw: String and Array manipulation is the domain of Perl.
> 3) How do we execute a mysql query in shell script.
Use mysql as a commandline utility (inside shell scripts) or use perl
-MDBD::mysql (DBI and DBD must be compiled/installed before).
--jk