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
Multiple functions amitrajvarma Shell Programming and Scripting 1 11-27-2007 08:21 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 11-23-2007
Registered User
 

Join Date: Oct 2007
Posts: 43
Use of functions

Hi

my shell is tcsh

can I have functions in my shell scripting?

Is the below shell script correct.
Can I have two functions and call one of them as required.


----------

echo "functions"
f1


f1 ()
{ echo "hello" }

f2 ()
{ echo "world" }

----------

Thanks
Amit
Reply With Quote
Forum Sponsor
  #2  
Old 11-23-2007
radoulov's Avatar
addict
 

Join Date: Jan 2007
Location: Milano, Italia/Варна, България
Posts: 1,933
Quote:
Originally Posted by amitrajvarma View Post
Hi

my shell is tcsh

can I have functions in my shell scripting?
[...]
No.



(message too short)
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 07:05 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