User Tools

Site Tools


howtos:toolcoding:tool_shell_scripts

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
howtos:toolcoding:tool_shell_scripts [2010/03/16 12:30]
shona.weldon
howtos:toolcoding:tool_shell_scripts [2010/03/16 12:40]
shona.weldon
Line 3: Line 3:
 Sometimes it is useful to use TOOL scripts in a "​sandbox"​ or "​scratchpad"​ manner—for experimentation,​ learning new tools, instant feedback, etc.—without the overhead of setting up a new model family and framework, and without the worry of breaking anything. ​ In this cases, TOOL shell scripts can be handy. Sometimes it is useful to use TOOL scripts in a "​sandbox"​ or "​scratchpad"​ manner—for experimentation,​ learning new tools, instant feedback, etc.—without the overhead of setting up a new model family and framework, and without the worry of breaking anything. ​ In this cases, TOOL shell scripts can be handy.
  
-Using the TOOL shell application,​ which can be launched from the Programs menu under the whatIf grouping, gives you an interactive TOOL session.+Using the TOOL shell application,​ which can be launched from the Programs menu under the whatIf grouping, gives you an interactive TOOL session ​which can be used to run tool commands directly or run a tool script. 
 + 
 +===== TOOL interactive commands ===== 
 + 
 +When you launch the TOOL shell you will be asked for server connection information and then you will see a prompt: 
 +<​code>​ TOOL> </​code>​ 
 + 
 +You can run tool commands directly or you can run a script from a file.  The most commonly a script file is used.  Before you run a script you will need to get to the right directory and setup the environment. ​ Here are a few common commands you may find useful, more detail can be found in the documentation under TOOL Language/​TOOL Commands. 
 +  * showenv() - shows all the builtin variables like $informPath,​ $toolsDir and $dir which you may want to set  
 +  * where() - shows what directory on the server you are in. 
 +  * moveto("​path"​) - changes the current directory to path which can be either a relative or full path 
 +  * look() - shows what is in the current directory optionally a string can be provided to filter the results 
 + 
 + 
 + 
  
 ===== Calling a Shell Script ===== ===== Calling a Shell Script =====
howtos/toolcoding/tool_shell_scripts.txt · Last modified: 2011/05/13 12:27 by shona.weldon