C-shell help

C-shell help

Post by Menashe Dickma » Tue, 30 Apr 1996 04:00:00



--

Does anyone know the correct syntax for using a function in C-shell?  I know
that in Kourne shell the function is declared as:

my_func()
{
    code goes here...
    arguments are referenced as $1, $2, etc...

Quote:}

and called as:

my_func arg1 arg2 arg3...

I need to know how to do this in C-shell.

Thanks,

Menashe

_______________________________________________________________________________
                               Menashe*man

Merrill *                                            Phone: (212) 449-5208

_______________________________________________________________________________

 
 
 

C-shell help

Post by Ronald Fische » Thu, 09 May 1996 04:00:00



>--

>Does anyone know the correct syntax for using a function in C-shell?  I know
>that in Kourne shell the function is declared as:

>my_func()
>{
>    code goes here...
>    arguments are referenced as $1, $2, etc...
>}

>and called as:

>my_func arg1 arg2 arg3...

>I need to know how to do this in C-shell.

>Thanks,

>Menashe

That's an easy one:

csh does not have shell functions at all. This has the advantage that you won't
forget the syntax....

Ronald

 
 
 

C-shell help

Post by Brian S Hil » Sat, 11 May 1996 04:00:00


: Does anyone know the correct syntax for using a function in C-shell?  I know
: that in Kourne shell the function is declared as:
: my_func()
: {
:     code goes here...
:     arguments are referenced as $1, $2, etc...
: }
: and called as:
: my_func arg1 arg2 arg3...
: I need to know how to do this in C-shell.
: Thanks,
: Menashe

I predict that you are about to receive beaucoup followups informing you
that functions are not implemented as part of csh/tcsh.

One may [judiciously] use gotos/labels to simulate this feature.

-Brian
--
   ,---.     ,---.     ,---.     ,---.     ,---.     ,---.     ,---.  
  /  _  \   /  _  \   /  _  \   /  _  \   /  _  \   /  _  \   /  _  \  

__,'   `.___,'   `.___,'   `.___,'   `.___,'   `.___,'   `.___,'   `.__

 
 
 

1. C-shell help

Does anyone know the correct syntax for using a function in C-shell?  I know
that in Korn shell the function is declared as:

my_func()
{
    code goes here...
    arguments are referenced as $1, $2, etc...

and called as:

my_func arg1 arg2 arg3...

I need to know how to do this in C-shell.

Thanks,

Menashe

--
_______________________________________________________________________________
                               Menashe Dickman

Merrill Lynch                                            Phone: (212) 449-5208

_______________________________________________________________________________

2. programatically accessing call stack information

3. MODEM INIT STRINGS THAT WORK...

4. Shell Script Help (C-Shell Script)

5. Can't make a module for my nic with new kernel

6. Changing from the Bourne shell to C-shell

7. Announcing RxLinux: The Ready to eXecute iso cdrom distribution

8. C-shell on System V shell

9. Bourne Shell vs C-Shell

10. c-shell script won't run from korn-shell / SETUID

11. Korn shell vs C-shell

12. Process history under C-shell and Bourne shell