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:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=pX1f5f7i03+jjQmK TnQfWqsCf0dMaRpad2VV3RWUa+QNU4kjnmr0dYNid+7kqt0+Et688BL0YTmu2Yse mmz00wu6UeR3mfVpGRgEGY5f71jmvWp9Wjmzd1HyB2EH3zqFRBW/Va4BquIT0gYf mgRj6kHyb5U8lhPDOh6VLnEz6pE= 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:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=QNZBATCujvBXKNCq7IU/5s a+a0Y=; b=G9swjBvsdITMD6tOPDfpXgHKegTW4Q6C1NN/wzdNGnIiUzt5xq/qtI IseMMhcPGB0mkB+xxw2WZvN2pZ2VOeLy7yx2yEMoFaqJYYM2rfH1iwSK6O0q0lZ4 DOWCxfGcZbQegYKfF+/yFrXu4N5KhTr6faYQMcDArzh3EDjiwUSvk= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , 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.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 X-Received: by 10.28.97.197 with SMTP id v188mr18508641wmb.63.1448269031136; Mon, 23 Nov 2015 00:57:11 -0800 (PST) Subject: Re: Data file access on different path (drive) To: cygwin AT cygwin DOT com References: From: Marco Atzeri Message-ID: <5652D4DE.8060206@gmail.com> Date: Mon, 23 Nov 2015 09:57:02 +0100 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 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