McIDAS User's Guide
Version 2015.1

[Search Manual] [Table of Contents] [Go to Previous] [Go to Next]

Starting Shell Scripts That Run mcenv

Other programs and scripts can run mcenv. The example below shows a shell script that runs a mcenv script. The mcenv script appears in bold.

# Sample script

export MCPATH

mcenv -f 520x690 << 'EOF'
logon.k USER 1234
imgdisp.k MYDATA/VIS 1
frmsave.k 1 MYPICT.GIF
exit 0

The mcenv script runs everything from the logon.k command to the EOF statement within the McIDAS environment set with a 520x690 frame. Note that single quotes surround the first EOF in the first line of the mcenv script. Single quotes prevent the shell from substituting any variables within the mcenv script before they are set to the correct value.

[Search Manual] [Table of Contents] [Go to Previous] [Go to Next]