It is currently Tue, 30 Nov 2021 16:46:47 GMT



 
Author Message
 How to define funtions in tcsh?
hi,
 It seem the tcsh manual of redhat hasnot mentioned
 how to define function, what's the syntax

Sent via Deja.com http://www.**-**.com/
Before you buy.



 Sun, 24 Mar 2002 03:00:00 GMT   
 How to define funtions in tcsh?

Did you really think that the manual would simply omit all mention of such
a feature if it really existed?  I know that sometimes man pages omit small
features like an option or two, but this would be a major fumble.  The
simple fact is that csh and tcsh don't have functions; the closest thing is
aliases (which are in the man page).

Don't try to use csh or tcsh as a scripting language, you'll just frustrate
yourself.  There's a periodic post that explains all the problems with csh
in this regard.

--
Barry Margolin, bar...@bbnplanet.com
GTE Internetworking, Powered by BBN, Burlington, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.



 Sun, 24 Mar 2002 03:00:00 GMT   
 How to define funtions in tcsh?
Hello!

On Wed, 06 Oct 1999 15:24:32 GMT, yan...@my-deja.com <yan...@my-deja.com>
wrote:

That can't be!  tcsh doesn't have support for user defined functions.
Sorry, but that's the truth.

Bye,
     Carsten

--
Carsten Luckmann
Institut fuer Theoretische Physik
Universitaet Hannover, Deutschland
echo luckmann=itp_uni-hannover_de | sed -e 'y/=_/@./' # to mail me



 Sun, 24 Mar 2002 03:00:00 GMT   
 How to define funtions in tcsh?

tcsh-man:

BUGS:
       Alias substitution is most often used to clumsily simulate
       shell procedures;  shell  procedures  should  be  provided
       rather than aliases. "

Rick



 Sun, 24 Mar 2002 03:00:00 GMT   
 How to define funtions in tcsh?

I tend to prefer ksh myself, but he'd have to go out and get
it and install it on a Red Hat system.  bash, OTOH, is
probably already installed and is not a bad shell at all.

                       Chris Mattern



 Sun, 24 Mar 2002 03:00:00 GMT   
 How to define funtions in tcsh?

Correct, it isn't.  Thing is, pdksh isn't either, really.  And he'd
*still* have to go out and install it, which might be a bit involved
for him.  And anyways, if it's for personal use, he can get ksh for
free.  If he has to install something, might as well install the
real thing.

                           Chris Mattern



 Mon, 25 Mar 2002 03:00:00 GMT   
 How to define funtions in tcsh?
In article <6J2L3.1156$n7.8...@grover.nit.gwu.edu>,
Christopher J. Mattern <sys...@gwis2.circ.gwu.edu> wrote:

Maybe he's not willing to install something that doesn't come with source?

I'm really curious as to what the differences really are.  Frankly, I used
AT&T ksh for several years, then switched to pdksh.  I vaguely remember that
there was one difference that affected me, but it was a bug and it got fixed.

Honestly, I think they're a lot more similar than people give them credit
for; none of my scripts care which one I use.

-s
--
Copyright 1999, All rights reserved.  Peter Seebach / se...@plethora.net
C/Unix wizard, Pro-commerce radical, Spam fighter.  Boycott Spamazon!
Will work for interesting hardware.  http://www.plethora.net/~seebs/
Visit my new ISP <URL:http://www.plethora.net/> --- More Net, Less Spam!



 Mon, 25 Mar 2002 03:00:00 GMT   
 How to define funtions in tcsh?

For example that echo bar | read foo dosnt set foo in the current shell?
Its a design bug and cant be done in pdksh and it drives me nuts.

PDKSH is nice to work with but I prefer AT&T ksah if Ive the choice.

CU, Ralf.
--
Ralf Draeger             ralf.drae...@intraplan.de             www.intraplan.de
- Intraplan Consult Gmbh     Orleansplatz 5a  81667 Muenchen   +49 89 45911-0 -

UNIX is the answer, but only if you phrase the question very carefully.



 Tue, 26 Mar 2002 03:00:00 GMT   
 
   [ 8 post ] 

Similar Threads

1. Define Tcsh Alias with $ Character as Regexp

2. tcsh: define function-like alias

3. gcc #define #define #define

4. How to enable accelerator funtions in X

5. C funtions

6. m4: how to define var if another defined

7. #define _POSIX_C_SOURCE and other defines

8. /bin/tcsh vs /usr/local/bin/tcsh

9. Help to find a good book on csh/tcsh to teach myself csh/tcsh script


 
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software