how to call csh scripts from inside other csh scripts

how to call csh scripts from inside other csh scripts

Post by Michael Gree » Tue, 16 Jun 1998 04:00:00



I've got a csh script that executes other csh scripts. The problem is that
despite the fact that all the scripts are in my path, if I do not copy the
scripts that are being called into the subdirectory where the master script
is executed, then the master script complains that it cannot find these other
scripts.

Is this something that's a part of csh, or is there a way to actually get this to work?

 
 
 

how to call csh scripts from inside other csh scripts

Post by Christian Bauernfei » Tue, 16 Jun 1998 04:00:00




Quote:

> I've got a csh script that executes other csh scripts. The problem is that
> despite the fact that all the scripts are in my path, if I do not copy the
> scripts that are being called into the subdirectory where the master script
> is executed, then the master script complains that it cannot find these other
> scripts.

Is the execute bit set on the scripts in their original place?
Are you 100% sure your script uses the same path? If it's started from
cron, it might be different.

Quote:> Is this something that's a part of csh, or is there a way to actually get this to work?

There's no reason why it shouldn't work, some of the commands in /usr/bin
are scripts. You shouldn't even notice.

Christian
--
Christian Bauernfeind
Not speaking for Siemens
Not even working for IBM


 
 
 

how to call csh scripts from inside other csh scripts

Post by David Waffe » Tue, 16 Jun 1998 04:00:00


It is always good to specific absoulte path names for scripts, web
development and html different.  Try that...of course make sure the scripts
are not moved.  I don't see why relative path would not work for you too
(ex.  . /somescript_name)
Are you sure that the scripts reads your .cshrc file?  #!/bin/csh -f will
not.  Are you running the scripts as yourself or root.  If root, make sure
the directories are in root's .cshrc file path too.

Either way.  Absoulte or relative.  If relative I always put .(dot)/ in
front.

waffen

 
 
 

1. csh scripts inside ksh script?

Hello,

Just a simple and stupid question.

Can I run some csh scripts inside a ksh script?

I was just given some csh scripts and I don't know csh.  I know ksh but
not very much(only the basics). I just want to run those csh scripts in
my new ksh scripts.

Are there any implications if I run this??

If I define a variable in ksh, will this variable get imported in the
csh scripts if it uses one.

Thanks in advance.

little_jenny;)

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

2. Xf86Config + Compaq Armada 7730 +pcmcia

3. csh commands within csh scripts

4. Shell & perl users ?

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

6. Need Help With Compiler

7. Problem with nawk inside csh script

8. Direction of SP nodes?

9. Q: How to redirect stdin inside a csh script ?

10. Changing GID inside csh script

11. variable in awk inside csh script

12. Calling another script inside a script

13. Sourcing a csh script from a ksh script