Try like this
repeat/range=1:12/name=ll (;\
say `ll`;\
;\
;\ ! Array holds your filename in a directory
;\
let dir_file_array = { spawn: 'ls 2013.0`ll`/*.nc' };\
;\
;\ ! Array length using wc
let arr_len = { spawn: 'ls 2013.0`ll`/*.nc | wc -l'};\
;\
;\ ! You can remove these lines..
list `arr_len`; list dir_file_array;\
;\
;\
;\ ! If files exists then arr_len will be greater than zero process further...
IF `arr_len` THEN;\
repeat/range=1:`arr_len`/name=dd (;\
let infile = dir_file_array[i=`dd`];\
use `infile`;\
show data;\
can data/all;\
);\
ENDIF;\
)
--
Akshay Hegde,
Forum Advisor
The Unix and Linux Forum Users
http://www.unix.com
http://in.linkedin.com/pub/akshay-hegde/59/b3/b1b