Visit The New, Modern Unix Linux Community


csh shell script 'set' argument limit?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting csh shell script 'set' argument limit?
# 1  
csh shell script 'set' argument limit?

Hi ,

I have a script that is causing a problem that led me to think if there is a limit to the number of arguments for 'set' command in csh shell script.
Here is my script:
Code:
#!/bin/csh -f

set top = design_top
#1
set v_mbist =  (  sim_mbist/*.v )
#2
set v_simlist  = (      -v net/rtl/bridges/*.v \ 
			-v net/rtl/core/*.v \
			-v net/rtl/debug/*.v \
			-v net/rtl/memories/*.v \
		        ...
		        ...#40 plus lines in between
		        ...
 			-v net/design/lcd/rtl/*.v \
 			-v net/design/plcm_core/rtl/*.v )
#3
set mem_list   = ( sim_mem/*.v )

I get past #1, but get this error in #2 above.
Code:
584 integration > ./run 
Too many ('s.
585 integration >

Greatly appreciate if you could suggest any solutions.

Thank you.
# 2  
I take any one of those 40+ *.v's can expand into a potentially unlimited number of arguments?

The solution to too many arguments is to not use too many arguments... Find some way to use a tool like find to iterate through them instead, saving to a temp file if necessary.
# 3  
Hi Corona688,

Thanks for the reply but those file list are used by multiple teams and need to be preserved. I cannot cat them just yet.
BTW if I use something like this:
Code:
set v_simlist  =  " netsrc/rtl/bridges/*.v   .......all 40+ files .... "

It seems to work though.

Regards.

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Test Your Knowledge in Computers #292
Difficulty: Easy
In 2011, Google introduced the Chromebook, a web thin client running Android..
True or False?

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

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... (2 Replies)
Discussion started by: SA_Palani
2 Replies

2. Shell Programming and Scripting

Help needed with shell script to search and replace a set of strings among the set of files

Hi, I am looking for a shell script which serves the below purpose. Please find below the algorithm for the same and any help on this would be highly appreciated. 1)set of strings need to be replaced among set of files(directory may contain different types of files) 2)It should search for... (10 Replies)
Discussion started by: Amulya
10 Replies

3. Shell Programming and Scripting

Help on command line argument in csh

HI , I am new to csh. I need to pass some command line arguments like ./abc.sh -os Linux -path abc -tl aa -PILX 1 I have defined the loop as shown below. But its taking "-os" switches as arguments. Its treating them as arguments. How to resolve it? while ( $#argv != 0 ) switch ($argv) ... (7 Replies)
Discussion started by: vineet.dhingra
7 Replies

4. Shell Programming and Scripting

Cannot compare argument in if statement in csh/grep command if argument starts with -

If ($argv == “-debug”) then Echo “in loop” Endif But this is not working. If I modify this code and remove “-“, then it works. Similarly I am getting problem using grep command also Grep “-debug” Filename Can someone please help me on how to resolve these... (1 Reply)
Discussion started by: sarbjit
1 Replies

5. Shell Programming and Scripting

Recognizing an argument in csh

I will be passing an argument to a csh script The script can be either of two forms For example, either script.csh zloc=5/10 or script.csh zloc=5/10/20 So there can be either two values or three values. How can I distinguish which one the user has inputted? I have made... (1 Reply)
Discussion started by: kristinu
1 Replies

6. Shell Programming and Scripting

Limit ouput file on a shell script

I have this one::) doing jstack on JVM proccess. #!/bin/ksh # ---------------------------------------------------- # capture_jstack.sh <INTERVAL> <COUNT> # run jstack and capture output to a log file #----------------------------------------------------- # # scripts and logs are stored... (3 Replies)
Discussion started by: pointer
3 Replies

7. Shell Programming and Scripting

In a csh script, can I set a variable to the result of an SQLPLUS select query?

Can someone tell me why I'm getting error when I try to run this? #!/bin/csh -f source ~/.cshrc # set SQLPLUS = ${ORACLE_HOME}/bin/sqlplus # set count=`$SQLPLUS -s ${DB_LOGIN} << END select count(1) from put_groups where group_name='PC' and description='EOD_EVENT' and serial_number=1;... (7 Replies)
Discussion started by: gregrobinsonhd
7 Replies

8. Shell Programming and Scripting

I need to set a time limit for a script

Hello Folks, I have been asked to write a test script which can be run by students. the script should have a time limit. I have almost completed it except the bit of timing! I've seen something like this: on_timeout() { echo "$USER $score " >> theresult.txt echo "Time out!... (2 Replies)
Discussion started by: SultanKSA
2 Replies

9. Shell Programming and Scripting

Is there a limit to the no. of arguments to a shell script ?

What is the maximum no. of arguments that could be passed to a shell script ? Is there any restriction ? I've a requirement where I need to pass a list of names to a unix script and I guess the number of such names is not a fixed one. It can run into hundreds. Is this feasible ? (4 Replies)
Discussion started by: hidnana
4 Replies

Featured Tech Videos