Hi Gopal, It looks like Akshay has given you some ideas, but I have a couple more comments. The `a,return=iend` syntax is not going to give you the result you want for the result of a SPAWN command. RETURN=iend tells you the length of the X axis of the grid of the variable, not the number of values. SPAWN always returns data on a longer, abstract axis, so it's not what you need. This: let nfiles = `a[i=@ngd]` will work fine for a string variable. Your SPAWN command includes the string "dummy", so you'd want to subtract 1. And, I have a tip when debugging an error that's happening inside a repeat loop. Make a version of your script which just executes the commands once, one at a time. For your script, the outer loop would look like this: (I see that you have defined variable nfiles, but then used nfile the second loop, so that's one thing to fix) let ll = 1Now do the same thing with the second repeat loop, execute the commands for the first element of the repeat, and find any errors: let dd = 1Once that's all working then you can put the commands back into the loops and they should run. Ansley On 7/11/2014 3:20 AM, Gopal Mondal
wrote:
|