This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Data file access on different path (drive)


Thanks Peter! Finally got the test script to run :

#!/bin/bash
ruta_elev="Q:/geophys/Potential-field datasets/Topography/topo_17.1.img"
ruta_grav="Q:/geophys/Potential-field datasets/Gravity/grav.img.23.1"
lon_min=-12
lon_max=0
lat_min=28
lat_max=39
echo $lon_min $lon_max $lat_min $lat_max
img2grd "$ruta_elev"  -V -T1 -R$lon_min/$lon_max/$lat_min/$lat_max -S1
-Gelev.grd -I1m -D
img2grd "$ruta_grav" -T1 -V -R$lon_min/$lon_max/$lat_min/$lat_max
-S0.1 -GFA.grd -I1m -D

Using the path as Q:/... worked but the Cygrdrive/q/... did not.

Lester

On 23 November 2015 at 10:23, Peter Rosin <peda@lysator.liu.se> wrote:
>
> On 2015-11-23 10:51, Lester Anderson wrote:
>> Hello,
>>
>> I tried a very basic script to test this:
>>
>> #!/bin/bash
>> ruta_elev="cygdrive/q/geophys/Potential-field datasets/Topography/topo_17.1.img"
>> ruta_grav="cygdrive/q/geophys/Potential-field datasets/Gravity/grav.img.23.1"
>> # Also tried
>> # ruta_elev="Q:/geophys/Potential-field datasets/Topography/topo_17.1.img"
>> # ruta_grav="Q:/geophys/Potential-field datasets/Gravity/grav.img.23.1"
>> lon_min=-12
>> lon_max=0
>> lat_min=28
>> lat_max=39
>> img2grd $ruta_elev  -V -T1 -R$lon_min/$lon_max/$lat_min/$lat_max -S1
> In addition to the typo with the leading slash, you also need to quote the file path here,
> like so:
>
> img2grd "$ruta_elev"  -V -T1 -R$lon_min/$lon_max/$lat_min/$lat_max -S1
>
>
> Cheers,
> Peter
>
> --
> Problem reports:       http://cygwin.com/problems.html
> FAQ:                   http://cygwin.com/faq/
> Documentation:         http://cygwin.com/docs.html
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
>

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]