using LINUX command in ferret and its applications

<BASIC>

spawn (or sp) run LINUX command in ferret.

ex)

yes? sp pwd

/home/dwyi/ferret/test/

 

<APPLICATIONS>

<1. Setting variables >

let’s make running script.

 

let group = {“a”,”b”,”c”}

say “Put Alphabet (a~c) : ”

let name = “`{spawn: “head -1″}`”

 

you can set the variable(“name”) as “a”.  🙂

 

<2. Calling a data which you want from the list >

let model_list = {spawn: “ls /DATA/CMIP5/dwyi/present/temperature/*.nc”}

use “`model_list[i=1]`”

 

then, you can call the data without typing all of model names. 🙂

 

So Simple.

 

 

 

 

 

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s