![]() |
|
|
google unix.com
|
|||||||
| Fórumok | Regisztráció | Fórum Szabályok | Linkek | Albumok | GYIK | Tagok listája | Naptár | Keres | Mai hozzászólások | Megjelöl Fórumok Olvas |
| Shell programozás és Scripting Post kérdések KSH, CSH, SH, Bash, Perl, PHP, SED, AWK ÉS EGYÉB shell szkriptek és shell script nyelvek itt. |
Több, UNIX és Linux fórum témák Ön által talált Hasznos
|
||||
| Szál | Thread Starter | Fórum | Válaszok | Utolsó hozzászólás |
| 'end of file "váratlan | srisreeku | Shell programozás és Scripting | 1 | 04-28-2008 03:39 PM |
| váratlan fájl vége | naveeng.81 | Shell programozás és Scripting | 1 | 03-11-2008 06:43 AM |
| váratlan fájl vége | dineshr85 | Shell programozás és Scripting | 2 | 10-15-2007 03:47 AM |
| 'end of file "váratlan | abhijeetkul | Shell programozás és Scripting | 4 | 04-10-2006 07:42 AM |
| Gunzip: Unexpected end of file | Dolly | A UNIX a dummies Kérdések és válaszok | 1 | 09-26-2002 06:34 AM |
![]() |
|
|
LinkBack | Téma eszközök | Keresés a téma | Rate Thread | Megjelenítési módok |
|
|
|
||||
|
'end of file "váratlan
HELP PLEASE! Én vagyok ez a szkript fut, és úgy tartja, hogy az error 'end of file "váratlan. Tudom, hogy általában azt jelenti, zárójelben, vagy bármi is az, de én vidám talál semmit! Én vagyok az új betűtípust, és én egy kis "print" staements és nem kapok múltban az első IF nyilatkozat i dont gondol. Itt van a script. Köszi előre Kód:
#!/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 # Last edited by Franklin52; 10/11/2008 at 01:10 PM.. Ok: hozzá kódot tags |
|
||||
|
A szintaxis a nyilatkozat, ha nem megfelelő, cserélje ki a nyilatkozatot, és ha elif az: Kód:
if [ "$choice" -eq 1 ] and elif [ "$choice" -eq 2 ] Vigyázni kell, mert a terek körül zárójelben. Kérem, helyezze el a kódot a kód tags következő alkalommal, hogy javítsa az olvashatóság. Válaszd ki a kódot, és kattintson a # szimbólum felett editing ablakot. Üdvözlettel |
|
||||
|
Köszönöm a gyors választ, láthatjuk most, hogy már megváltoztatta a mondattan, de vagyok még, hogy az ugyanazt a hibát .... más javaslatok? Kód:
#!/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 # |
![]() |
| Könyvjelzõk |
| Téma eszközök | Keresés a téma |
| Megjelenítési módok | Rate this thread |
|
|