[GRASS-user] Running Scripts in GRASS

William Kyngesburye woklist at kyngchaos.com
Tue Aug 18 20:39:14 EDT 2009


On Aug 18, 2009, at 7:16 PM, Andrew Lewin wrote:

> Thanks for the help, but I am not quite clear on the part you say  
> the script has to be an executable.  I copied and pasted the script  
> from the wiki page and stored it in ~/Library/GRASS/6.4/Modules/bin;  
> called the script by typing it (called chlatransl) to the Terminal  
> shell.  It said "chlatranl not found".  How do I compile the script  
> to make it an executable.  Right now it is stored in a text file.
>
So, the script is: ~/Library/GRASS/6.4/Modules/bin/chlatransl

Take that chmod command I mentioned and type in the Terminal:

chmod +x ~/Library/GRASS/6.4/Modules/bin/chlatransl

> I apologize for being naive.
>
> Andrew
>
>
> Andrew Lewin, M.Sc., Adv. Dipl. GIS
> Email: andrew.lewin at sympatico.ca
> Tel: (905) 639-4646
> Mobile: (905) 630-8441
> Skype: andrew.lewin99
>
> On 18-Aug-09, at 4:54 PM, William Kyngesburye wrote:
>
>> On Aug 18, 2009, at 3:18 PM, Andrew Lewin wrote:
>>
>>> Hi Everyone,
>>>
>>> I am a beginner user of GRASS (I normally use ArcGIS) running on  
>>> Mac OS X Grass 6.4 ORC5.
>>>
>>> I am trying to process MODIS chlor-a images according to the MODIS  
>>> Wiki page.  There are many scripts on the wiki page that I would  
>>> like to use; however, I do not know how to:
>>> 1) save the script file, i.e. what file extension to I use?
>>
>> use whatever filename the script has (or is specified).  No  
>> extension needed, but 'sh' is the standard shell script extension.   
>> But it does need to be executable, which won't be true if you  
>> download the raw script text or copy-n-paste.  It should be set if  
>> the script is compressed.
>>
>> In a Terminal, type this (drag-n-drop the script from a Finder  
>> window to the Terminal to paste the path to the script):
>>
>> chmod +x /path/to/script

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

"Time is an illusion - lunchtime doubly so."

- Ford Prefect




More information about the grass-user mailing list