The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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 and shell scripting languages 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 11:21 AM
ksh functions scriptingmani Shell Programming and Scripting 3 07-06-2007 07:15 AM
functions in Raom Shell Programming and Scripting 6 07-21-2006 03:06 AM
Regarding functions sendhilmani Shell Programming and Scripting 2 03-24-2006 04:40 AM
FTP functions hzambra High Level Programming 3 05-03-2002 01:06 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 11-23-2007
amitrajvarma amitrajvarma is offline
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
  #2 (permalink)  
Old 11-23-2007
radoulov's Avatar
radoulov radoulov is offline Forum Staff  
addict
  
 

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

my shell is tcsh

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



(message too short)
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 02:48 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0