|
Prev: mv or something else
Next: How to check text file have control character or not by shell script
From: deepak on 6 Apr 2008 12:28 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.
From: Johann Kappacher on 6 Apr 2008 12:48 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
From: deepak on 7 Apr 2008 02:52 thanks jk
From: Johann Kappacher on 7 Apr 2008 17:23 deepak wrote: > thanks jk This may be a starting point for you: http://tldp.org/LDP/abs/html/arrays.html The whole bash tutorial: http://tldp.org/LDP/abs/html/index.html Search for a "Learning bash" or so book.
|
Pages: 1 Prev: mv or something else Next: How to check text file have control character or not by shell script |