HJELP PLEASE!
Jeg kjører dette skriptet, og jeg får stadig feilmeldingen "slutt på fil" uventet. Jeg vet det betyr vanligvis parentes eller hva er malplassert men jeg skrånende finner noe! Jeg er ny på scripting og jeg satt litt "print" staements i og det ikke kommer forbi den første IF uttalelse jeg dont overveie. Her er skriptet. Takk på forhånd
Code:
#!/bin/sh
echo "Please enter a station: \c"
read station
echo "Please enter the desired timestamp: \c"
read timestamp
cp PBLplot.pro $station/$timestamp
cd $station/$timestamp/
echo "Would you like to plot (1) 4panel with one var per map or (2) 4panel all vars per map: \c"
read choice
echo "$choice"
if "$choice" -eq 1
then
echo "Please enter temperature variable (Skin, Tmpc, T10m, T20m, Dwpc, Ts01, Ts02): \c"
read temperature
echo "Please enter flux variable (Sens, Soil, Latn, Snof, Rdwn, Fupf, Sped): \c"
read fluxvar
echo "Please enter boundary layer variable (Hpbl, Fclc, Zlcl, Thbr, Shbr, Tdir, Tspd): \c"
read bl
echo "Please enter solar radiation variable (Sold, Solu, Atmr, Terr, Netr, Sumr, Bown): \c"
read solarrad
echo "Do you want to save this plot?: \c"
read saveplot
echo "Enter a file name (no extensions please): \c"
read filename
idl<<EOF
.compile PBLplot.pro
PBL
$timestamp
$choice
$temperature
$fluxvar
$bl
$solarrad
$saveplot
$filename
exit
EOF
elif "$choice" -eq 2
then
echo "Do you want to save this plot?: \c"
read saveplot
echo "Enter a file name (no extensions please): \c"
read filename
idl<<EOF
.compile PBLplot.pro
PBL
$timestamp
$choice
$saveplot
$filename
exit
EOF
fi
echo "continue"
rm PBLplot.pro
#