From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6557 invoked by alias); 23 Nov 2015 08:57:17 -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 6546 invoked by uid 89); 23 Nov 2015 08:57:17 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-wm0-f53.google.com Received: from mail-wm0-f53.google.com (HELO mail-wm0-f53.google.com) (74.125.82.53) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Mon, 23 Nov 2015 08:57:14 +0000 Received: by wmuu63 with SMTP id u63so44365681wmu.0 for ; Mon, 23 Nov 2015 00:57:11 -0800 (PST) X-Received: by 10.28.97.197 with SMTP id v188mr18508641wmb.63.1448269031136; Mon, 23 Nov 2015 00:57:11 -0800 (PST) Received: from [172.21.188.140] ([149.6.156.42]) by smtp.googlemail.com with ESMTPSA id an7sm12130798wjc.44.2015.11.23.00.57.10 for (version=TLSv1/SSLv3 cipher=OTHER); Mon, 23 Nov 2015 00:57:10 -0800 (PST) Subject: Re: Data file access on different path (drive) To: cygwin@cygwin.com References: From: Marco Atzeri Message-ID: <5652D4DE.8060206@gmail.com> Date: Mon, 23 Nov 2015 08:57:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-11/txt/msg00326.txt.bz2 On 23/11/2015 09:54, Lester Anderson wrote: > 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" Try: ruta_grav="cygdrive/q/geophys/Potential-field datasets/Gravity/grav.img.23 and /cygdrive/c/test > 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 > -- 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