Using CDO when spaces exist in file paths?
Added by Robert Wilson almost 2 years ago
Is there a way to use CDO when file paths have spaces in them? I always avoid them, but I'm working with a lot of data that has them.
The following does not work when I try it:
cdo timmean "foo foo.nc" out.nc
This seems to be parsed by CDO as
cdo timmean [foo foo.nc] out.nc
Is there a work around for this?
Regards
Robert
Replies (2)
RE: Using CDO when spaces exist in file paths? - Added by Estanislao Gavilan almost 2 years ago
Hi Robert,
I tried different choices without success. I recommend to write a simple script where your can make a list with the name of the folders like
path_folder=`pwd`'/'*
for x in $path_folder;
do
if [ -d "${x}" ]; then
echo ${x}
cd x
cdo blablabla.nc pepe.nc
fi
done
Kind regards,
Estanislao
RE: Using CDO when spaces exist in file paths? - Added by Ralf Mueller almost 2 years ago
@Robert this behavior is standard shell handling of quoted stings. thats why cdo does handles "foo foo.nc" as a single thing. The question for me is more like: Why do you want to do something like this? Do you use blank in file names?
cheers
ralf