delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/11/23/03:54:55

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:date:message-id:subject:from:to
:content-type; q=dns; s=default; b=vKc1TysxMX4Z794B5OUhV2rdaERNI
Qjv8OrkvCihp3UxMHim7OKV2giqpAvo4d1e00zJGewQDgYJwm9F+9e1bGBtFsxdy
S1mOijOb7PZsCftvJYAz4QYzsRSZP2tHPD95bSCqKdHY9WAVRwepfE9l6VyZ45wt
Za0R4MQqbO7MYg=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:date:message-id:subject:from:to
:content-type; s=default; bh=/a/vnGWJfxdz+YzUMBW79GZEBAc=; b=u+l
Kaog2/7KAIpdzggpjc2bLz8n7zO2W3/dCZKYqf24uT1BBge4309RiyOD+thdcPgI
Q205ExJNy8wRW607TwOblcQ+dGJWKHvPdzmZSADmtCjbXamL8zRNz45kz7UBO4Rw
vqtKM0ocAbaWGkEv3p4pxTgQXkZeqFjuRJkJ5y6k=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=2.9 required=5.0 tests=AWL,BAYES_05,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2
X-HELO: mail-lb0-f173.google.com
MIME-Version: 1.0
X-Received: by 10.112.137.34 with SMTP id qf2mr10096153lbb.35.1448268875922; Mon, 23 Nov 2015 00:54:35 -0800 (PST)
Date: Mon, 23 Nov 2015 08:54:35 +0000
Message-ID: <CAE3taFBySrYf7=ZCadpe=dZtZaXmhhf5RnYtmndUd1eGa1x6XQ@mail.gmail.com>
Subject: Data file access on different path (drive)
From: Lester Anderson <arctica1963 AT gmail DOT com>
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes

Hello,

I am fairly new to using Cygwin, so hope that this query is not too simplistic.

I have a bash script that integrates a lot of GMT commands and also
calls a Fortran program to generate a map output. Now the problem is
how to get the script/Cygwin to access two data files on a different
drive (Q:) to the script location (C:/test).

In addition, it also needs to run a Fortran program, so not sure how that works.

The data read front looks like this (the parts that are problematic):


ruta_elev="Q:/geophys/Potential-field datasets/Topography/topo_17.1.img"
ruta_grav="Q:/geophys/Potential-field datasets/Gravity/grav.img.23.1"

img2grd $ruta_elev  -V -T1
-R$lon_e_min/$lon_e_max/$lat_e_min/$lat_e_max -S1 -Gelev.grd -m1
img2grd $ruta_grav -T1 -V
-R$lon_e_min/$lon_e_max/$lat_e_min/$lat_e_max -S0.1 -GFA.grd -m1
.... etc
#Call FA2Boug (Fortran) program to calculate Bouguer anomaly
time  ./FA2Boug_final
... etc

I have not so far managed to get the script to access the data files
and thus the rest of the script does not work.
Although one can cd to the location with the " " method (it has a
space in the folder name).

$ cd "Q:/geophys/Potential-field datasets/Topography/"
/cygdrive/q/geophys/Potential-field datasets/Topography

The issue seems to be that $ruta_elev (for example) points to the file
topo_17.1.img but does not seem to assign the name when pointing to a
different drive. I am sure it would work with the files in the same
directory, but these are large!

Any pointers on how this should work would be helpful.

Lester

--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019