From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1022 invoked by alias); 23 Nov 2015 08:54:41 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 1007 invoked by uid 89); 23 Nov 2015 08:54:40 -0000 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 Received: from mail-lb0-f173.google.com (HELO mail-lb0-f173.google.com) (209.85.217.173) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Mon, 23 Nov 2015 08:54:39 +0000 Received: by lbbcs9 with SMTP id cs9so91566796lbb.1 for ; Mon, 23 Nov 2015 00:54:36 -0800 (PST) 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) Received: by 10.25.80.202 with HTTP; Mon, 23 Nov 2015 00:54:35 -0800 (PST) Date: Mon, 23 Nov 2015 08:54:00 -0000 Message-ID: Subject: Data file access on different path (drive) From: Lester Anderson To: cygwin@cygwin.com Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-11/txt/msg00325.txt.bz2 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