The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Use of functions amitrajvarma Shell Programming and Scripting 1 11-23-2007 03:52 AM
ksh functions scriptingmani Shell Programming and Scripting 3 07-06-2007 04:15 AM
functions in Raom Shell Programming and Scripting 6 07-21-2006 12:06 AM
Regarding functions sendhilmani Shell Programming and Scripting 2 03-24-2006 01:40 AM
FTP functions hzambra High Level Programming 3 05-03-2002 10:06 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 01-23-2008
Registered User
 

Join Date: Dec 2006
Location: hyderabad
Posts: 102
parameterised functions

Hi,
Can anybody tell me how to create a function with parameters
in a shell script.

cheers
RRK
Reply With Quote
Forum Sponsor
  #2  
Old 01-23-2008
mirusnet's Avatar
Registered User
 

Join Date: Dec 2007
Posts: 139
Quote:
Originally Posted by ravi raj kumar View Post
Hi,
Can anybody tell me how to create a function with parameters
in a shell script.
cheers
RRK

Code:
function some(){

a=$1;
b=$2;
echo "$a $b";
}


some "Hello," "World!";
Reply With Quote
  #3  
Old 01-23-2008
Registered User
 

Join Date: Dec 2006
Location: hyderabad
Posts: 102
Hi,
Thank u for answering .

cheers
RRK
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 06:31 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0