Hey guys, Im having some problems with a bash script that I wrote in order to create a map in GMT (Generic Mapping Tools). My problem is that bash does not recognize my "set commands" in the script. Here is a simple sample of the script:
#! /bin/bash
#
# test script
#
# Set Variables
set out = PS/output.ps
set project = m
set scale = 20
set region = -96:00/-94:00/-28:00/30:00
#
#
pscoast -Df -R$region -J$project$scale -Ba1mg0.1mWeSn -G207/207/207 \
-Ir/1/15/15/15 -P -V -K > $out
#
# end
echo finished
Ok, the file name for the script is "test" and I execute it by typing "sh test".
After that I get an error message stating: "Test: line 12: $out: ambiguous redirect".
Not sure what the means since I am just leaning linux. So, any help wold be great.
Also, I am running Red Hat Enterprise 3.0 on Vmware Workstation 4.5.
Thanks.
JF
#! /bin/bash
#
# test script
#
# Set Variables
set out = PS/output.ps
set project = m
set scale = 20
set region = -96:00/-94:00/-28:00/30:00
#
#
pscoast -Df -R$region -J$project$scale -Ba1mg0.1mWeSn -G207/207/207 \
-Ir/1/15/15/15 -P -V -K > $out
#
# end
echo finished
Ok, the file name for the script is "test" and I execute it by typing "sh test".
After that I get an error message stating: "Test: line 12: $out: ambiguous redirect".
Not sure what the means since I am just leaning linux. So, any help wold be great.
Also, I am running Red Hat Enterprise 3.0 on Vmware Workstation 4.5.
Thanks.
JF