[Thread Prev][Thread Next][Index]

Re: [ferret_users] Refer to a file with an escaped character



From the "/Volumes" path, I guess you're on a Mac (?)

I've tested it, and its works, with quotes and no escape character.

yes? use "/Users/marti/My File.nc"
yes? show data/all
     currently SET data sets:
    1> /Users/marti/My File.nc  (default)
....

I use pyferret 7.6.3 installed with Anaconda (python 3.9), on MacOS X 12.4 (Monterey)

What version do you use ? It could come from the readline library, which is not probably not the same in different version of [py]ferret

Olivier

Le 20 juil. 2022 à 23:31, William Kessler - NOAA Federal <william.s.kessler@xxxxxxxx> a écrit :

Hi all -

I have a netcdf file on an external disk with a space character in the directory name. I can find no direct way to bring it into Ferret.

All commands done from within Ferret:

1) The file exists (note the escaped space character in the directory name):
yes? sp ls -l /Volumes/WD\ Backup/Data/P145e_g.e20.G.TL319_t13.control.001.pop.wcit.2007_5day_FOR3p5Ntest.cdf
-rw-r--r--@ 1 billy  staff  352327724 Jul 12 21:19 /Volumes/WD Backup/Data/P145e_g.e20.G.TL319_t13.control.001.pop.wcit.2007_5day_FOR3p5Ntest.cdf

2) Trying to bring it in with the above name fails (again using an escape character):
yes? use "/Volumes/WD\ Backup/Data/P145e_g.e20.G.TL319_t13.control.001.pop.wcit.2007_5day_FOR3p5Ntest.cdf"
 **TMAP ERR: non-existent or not on line
             P145e_g.e20.G.TL319_t13.control.001.pop.wcit.2007_5day_FOR3p5Ntest.cdf

(Same result if I omit the escape character).

3) My workaround is to make a soft link:
yes? sp ln -s /Volumes/WD\ Backup/Data/P145e_g.e20.G.TL319_t13.control.001.pop.wcit.2007_5day_FOR3p5Ntest.cdf billyspop.nc
yes? use billyspop.nc        ! works

Is there a better way to do this?

Billy

— 
Olivier Marti
LSCE Bât 714 p. 1049
MERMAID Team
Normal situation :  +33 1 69 08 77 27 
Corona lockdown  :  +33 6 45 36 43 74

Attachment: smime.p7s
Description: S/MIME cryptographic signature


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

Privacy Policy | Disclaimer | Accessibility Statement