Pass C shell array to another C shell script(csh) and shell(sh)

Dear Friends,
Please help me on this
my script name is send.csh
In this i have written the statement like this

           set args = ( city state country price )

I want to pass this array to another c shell called receiver.csh. and i want to use it in this c shell
or
how to pass to shebang shell and use it from there

Thanks in advance

First off, the standard warning about C-shell scripts applies. Avoid using this buggy shell if you can and use (most preferably) Korn Shell or bash or (second-best alternatives) tcsh, zsh, or any other shell.

The keyword for this is source . When you use it and give it a file as parameter like:

source /path/to/file

the file with the specified name is executed in the same environment your calling script runs in. This way, if you set some variable inside "/path/to/file", it will be set in your calling script.

I hope this helps.

bakunin

May be I can explore my questions by this example.
I have the script like the below one. cshell

Name:NumberGeneration.csh

          #!/bin/csh 
          set Number = ( "one" "two" "three" "four" )
          echo "$#Number

Now I want to pass this array Number to another c shell called as Receiver.csh. How to send as commandLine argument to that script.@How to read from there?

In Receiver.csh, how to get the Number array

            #!/bin/csh
             set  GetNo = ( @ )  =>  how to get the Number array here.please help me