next up previous [pdf]

Next: SCons Up: Scripting Madagascar Previous: Scripting Madagascar

Shell scripting

Shell scripting is the first option for creating scripts. In shell scripting we simply copy the command lines that we would use and paste them into a file that is recognized by either BASH, C-shell or another shell of your choosing. Shell scripting may be familiar to users of other packages such as SU, because it is the primary method of scripting there. An example of a Madagascar shell script is shown below:

#!/bin/bash
sfspike n1=100 > file.rsf
< file.rsf sfgraph > file.vpl

For simple processing flows, shell scripting is a quick and easy approach to saving your processing flow. However, shell scripts quickly become unmanageable when more complicated processing flows are used. Additionally, shell scripts have no way to avoid repeating commands that have already been successfully run, which causes shell scripts to spend a significant amount of time duplicating already completed work. Because of these issues, Madagascar's main scripting option is to use a build manager called SCons for scripting instead of shell scripts.


next up previous [pdf]

Next: SCons Up: Scripting Madagascar Previous: Scripting Madagascar

2011-11-03