[Thread Prev][Thread Next][Index]

Re: [ferret_users] whether any provision is available to use shell commands, with ferret



hi Akshay,
Yes ferret allows that. You need to use spawn ls *.nc.
Then you can consider the repeat for the loop like this:
let ii=0;
let model={spawn:"ls *.nc"};
repeat/range=1:number_of_files (let ii=`ii+1`; let a=model[i=`ii`];use `a`;\
....... ! your commands
)

Hope that it could help

DIASSO



On 01/07/2013 09:27 AM, Akshay Hegde wrote:

Whether its possible to use shell commands in ferret...something like this...
because modifying many files kills time, if its possible something like this using for loop, it will be helpful..


sp for file in *.nc; do ! not working...

use $file

!do some operation say

let/units="meter"/title="my title" myvariable1 = xyz_new1

let/units="cm"/title="my title" myvariable2 = xyz_new2

list/file=$file_modifile.nc/format=cdf/clobber xyz_new1,
xyz_new2
done


Awaiting for reply...



- Akshay


[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement