ncrcat command regarding sftp server – in #13: Postprocessing

in #13: Postprocessing

<p> Dear Vladimir, </p> <p> Usually I put file list as argument to the commands, for example in bash I generate an array of file names: </p> <p> #loop after all files – make array of directory+files names <br/> for ((i=0;i <cnt;i++)); do="" member_files[i]="”${members[i]}$f“&lt;br"> </cnt;i++));> done </p> <p> and the array is argument to the command: </p> <p> ncecat ${member_files[*]} /users/kdm/plgajacz/tmp/cat_tmp </p> <p> but I see in <span class="caps"> NCO </span> documentation different solution: </p> <ol> <li> Use xargs to transfer filenames on the command line <br/> /bin/ls | grep ${CASEID}_’……’.nc | xargs -x ncecat -o foo.nc </li> </ol> <p> Cheers <br/> Adam </p>

  @adamjaczewski in #16907a3

<p> Dear Vladimir, </p> <p> Usually I put file list as argument to the commands, for example in bash I generate an array of file names: </p> <p> #loop after all files – make array of directory+files names <br/> for ((i=0;i <cnt;i++)); do="" member_files[i]="”${members[i]}$f“&lt;br"> </cnt;i++));> done </p> <p> and the array is argument to the command: </p> <p> ncecat ${member_files[*]} /users/kdm/plgajacz/tmp/cat_tmp </p> <p> but I see in <span class="caps"> NCO </span> documentation different solution: </p> <ol> <li> Use xargs to transfer filenames on the command line <br/> /bin/ls | grep ${CASEID}_’……’.nc | xargs -x ncecat -o foo.nc </li> </ol> <p> Cheers <br/> Adam </p>

Dear Vladimir,

Usually I put file list as argument to the commands, for example in bash I generate an array of file names:

#loop after all files – make array of directory+files names
for ((i=0;i done

and the array is argument to the command:

ncecat ${member_files[*]} /users/kdm/plgajacz/tmp/cat_tmp

but I see in NCO documentation different solution:

  1. Use xargs to transfer filenames on the command line
    /bin/ls | grep ${CASEID}_’……’.nc | xargs -x ncecat -o foo.nc

Cheers
Adam