![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | 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 and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Passing global variable to a function which is called by another function | sars | Shell Programming and Scripting | 4 | 06-30-2008 12:39 PM |
| Passing Parameter in SED command | dsrookie | UNIX for Dummies Questions & Answers | 2 | 06-09-2008 02:25 AM |
| Passing string from function with '*' | zam | Shell Programming and Scripting | 2 | 06-20-2007 05:19 AM |
| Parameter passing in a function | fastgoon | UNIX for Advanced & Expert Users | 2 | 07-26-2006 06:10 AM |
| parameter passing | kekanap | Shell Programming and Scripting | 8 | 07-20-2006 10:58 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Passing a string parameter to a function
I need to pass a parameter to a function in a script. My parameter is a string. When I display the parameter within my function, I only get the first word from string I pass in.
How can I make the function receive the whole string (and not terminate at the first space it encounters)?. part of the script I am executing $strExtractQuery="select * from TRAN with UR" echo "SQL to be validated: " ${strExtractQuery} sql_validate ${strExtractQuery} function sql_validate # Accepts 1 parameter { Sqltext=$1 echo "In sql validate " : ${Sqltext} } Output SQL to be validated: select TRAN_I from TRAN with UR In sql validate 1 : select Any help? Thanks |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|