Problema sh start.sh

Totalitatea subiectelor care nu respectă regulamentul impus in sectiunea "Probleme şi Întrebări" vor fi stocate aici.
Închis
Avatar utilizator
Pika
Nivel 2

Nivel 2
Mesaje: 202
Membru din: 11 Noi 2014, 19:42
Server: Colossus3
Regat: Shinsoo
Aprecieri: 406  
Mulţumiri: 247  
 Contact:
Medalii

Salutare.

Am si eu o problema la start imi da eroarea asta :
Erroare| Afiseaza codul
: not found
Metin2
1 - 1 Channel
2 - 2 Channel
: not found
1
: bad variable name
: not found
start.sh: 13: Syntax error: word unexpected (expecting ")")
sh start.sh| Afiseaza codul
#!/bin/sh


echo -e "\033[31m 
Metin2! \n
1 - (1) Porneste 1 CH.\n 
2 - (2) Porneste CH1,CH2 - ALL.\n  
\033[0m"

read chs

case $chs in 
1*)
	echo -e "\033[31m Se porneste Baza de date..\033[0m"
	cd /usr/home/game/db/
	./db &
	sleep 2
	clear
	echo -e "\033[31m \n Se porneste Auth ..\033[0m"
	cd /usr/home/game/auth 
	env  LD_32_PRELOAD=/usr/home/game/lib/LibCostume.so ./auth &
	sleep 2
	clear
	echo -e "\033[31m \n Se porneste CH 1 core ..\033[0m"
	cd /usr/home/game/channel1/core1
	env LD_32_PRELOAD=/usr/home/game/lib/LibCostume.so ./gamecore1 &
	sleep 2
	clear
	echo -e "\033[31m \n Se porneste CH 99 ..\033[0m"
	cd /usr/home/game/game99/
	env LD_32_PRELOAD=/usr/home/game/lib/LibCostume.so ./gamecore99 &
	sleep 2
	clear
	echo -e "\033[32m \n CH1 este pornit astapta 10 secunde!\033[0m"

;;
2*)
	echo -e "\033[31m Se porneste Baza de date ..\033[0m"
	cd /usr/home/game/db/
	./db &
	sleep 2
	clear
	echo -e "\033[31m \n Se porneste Auth ..\033[0m"
	cd /usr/home/game/auth 
	env LD_32_PRELOAD=/usr/home/game/lib/LibCostume.so ./auth &
	sleep 2
	clear
	echo -e "\033[31m \n Se porneste CH 1 core ..\033[0m"
	cd /usr/home/game/channel1/core1
	env LD_32_PRELOAD=/usr/home/game/lib/LibCostume.so ./gamecore1 &
	sleep 2
	clear
	echo -e "\033[31m \n Se porneste CH 2 core ..\033[0m"
	cd /usr/home/game/channel2/core1
	env LD_32_PRELOAD=/usr/home/game/lib/LibCostume.so ./gamecore1 &
	sleep 2
	clear
	cd /usr/home/game/game99/
	env LD_32_PRELOAD=/usr/home/game/lib/LibCostume.so ./gamecore99 &
	sleep 2
	clear
	echo -e "\033[32m \n Ch1 Si Ch2 Au fost Pornite astapta 30 secunde!\033[0m"

;;
esac
Ma puteti ajuta .
Multumesc.
Imagine
Afișează semnătura
Avatar utilizator
Ayan.S
Ţepar / Untrusted User

Ţepar / Untrusted User
Mesaje: 135
Membru din: 09 Apr 2017, 14:43
Aprecieri: 0
Mulţumiri: 12  
Medalii

Cod: Selectaţi tot

#!/bin/sh


echo -e "\033[31m 
Metin2! \n
1 - (1) Porneste 1 CH.\n 
2 - (2) Porneste CH1,CH2 - ALL.\n  
\033[0m"

read chs

case $chs in 
;;
1*)
	echo -e "\033[31m Se porneste Baza de date..\033[0m"
	cd /usr/home/game/db/
	./db &
	sleep 2
	clear
	echo -e "\033[31m \n Se porneste Auth ..\033[0m"
	cd /usr/home/game/auth 
	env  LD_32_PRELOAD=/usr/home/game/lib/LibCostume.so ./auth &
	sleep 2
	clear
	echo -e "\033[31m \n Se porneste CH 1 core ..\033[0m"
	cd /usr/home/game/channel1/core1
	env LD_32_PRELOAD=/usr/home/game/lib/LibCostume.so ./gamecore1 &
	sleep 2
	clear
	echo -e "\033[31m \n Se porneste CH 99 ..\033[0m"
	cd /usr/home/game/game99/
	env LD_32_PRELOAD=/usr/home/game/lib/LibCostume.so ./gamecore99 &
	sleep 2
	clear
	echo -e "\033[32m \n CH1 este pornit astapta 10 secunde!\033[0m"

;;
2*)
	echo -e "\033[31m Se porneste Baza de date ..\033[0m"
	cd /usr/home/game/db/
	./db &
	sleep 2
	clear
	echo -e "\033[31m \n Se porneste Auth ..\033[0m"
	cd /usr/home/game/auth 
	env LD_32_PRELOAD=/usr/home/game/lib/LibCostume.so ./auth &
	sleep 2
	clear
	echo -e "\033[31m \n Se porneste CH 1 core ..\033[0m"
	cd /usr/home/game/channel1/core1
	env LD_32_PRELOAD=/usr/home/game/lib/LibCostume.so ./gamecore1 &
	sleep 2
	clear
	echo -e "\033[31m \n Se porneste CH 2 core ..\033[0m"
	cd /usr/home/game/channel2/core1
	env LD_32_PRELOAD=/usr/home/game/lib/LibCostume.so ./gamecore1 &
	sleep 2
	clear
	cd /usr/home/game/game99/
	env LD_32_PRELOAD=/usr/home/game/lib/LibCostume.so ./gamecore99 &
	sleep 2
	clear
	echo -e "\033[32m \n Ch1 Si Ch2 Au fost Pornite astapta 30 secunde!\033[0m"

;;
esac
Avatar utilizator
Pika
Nivel 2

Nivel 2
Mesaje: 202
Membru din: 11 Noi 2014, 19:42
Server: Colossus3
Regat: Shinsoo
Aprecieri: 406  
Mulţumiri: 247  
 Contact:
Medalii

tot erroare imi da uite asa start.sh: 13: Syntax error: ";;"m unexpected (expecting ")") cand dau start si dau pe ch1
Imagine
Afișează semnătura
Avatar utilizator
ZNF
Membru Club

Membru Club
Mesaje: 1953
Membru din: 16 Feb 2014, 10:09
Aprecieri: 15  
Mulţumiri: 110  
Discord: Copiază ID
Medalii

Pika scrie:tot erroare imi da uite asa start.sh: 13: Syntax error: ";;"m unexpected (expecting ")") cand dau start si dau pe ch1
Poftim,incearca-l pe asta.
#!/bin/sh
echo -e "\033[36m===  [1]: Porneste serverul   ===\033[0m"
echo -e "\033[36m===  [2]: Porneste CH1,CH2 - ALL  ===\033[0m"
echo -e "\033[33m~~~~~~~~~~~~~~~~~~~~~~~~~~\033[0m"
read chs

case $chs in 
1*)

	echo -e "\033[31m Se porneste Baza de date..\033[0m"
	cd /usr/home/game/db/
	./db &
	sleep 2
	clear
	echo -e "\033[31m \n Se porneste Auth ..\033[0m"
	cd /usr/home/game/auth 
	env  LD_32_PRELOAD=/usr/home/game/lib/LibCostume.so ./auth &
	sleep 2
	clear
	echo -e "\033[31m \n Se porneste CH 1 core ..\033[0m"
	cd /usr/home/game/channel1/core1
	env LD_32_PRELOAD=/usr/home/game/lib/LibCostume.so ./gamecore1 &
	sleep 2
	clear
	echo -e "\033[31m \n Se porneste CH 99 ..\033[0m"
	cd /usr/home/game/game99/
	env LD_32_PRELOAD=/usr/home/game/lib/LibCostume.so ./gamecore99 &
	sleep 2
	clear
	echo -e "\033[32m \n CH1 este pornit astapta 10 secunde!\033[0m"

;;
2*)
clear
	echo -e "\033[31m Se porneste Baza de date ..\033[0m"
	cd /usr/home/game/db/
	./db &
	sleep 2
	clear
	echo -e "\033[31m \n Se porneste Auth ..\033[0m"
	cd /usr/home/game/auth 
	env LD_32_PRELOAD=/usr/home/game/lib/LibCostume.so ./auth &
	sleep 2
	clear
	echo -e "\033[31m \n Se porneste CH 1 core ..\033[0m"
	cd /usr/home/game/channel1/core1
	env LD_32_PRELOAD=/usr/home/game/lib/LibCostume.so ./gamecore1 &
	sleep 2
	clear
	echo -e "\033[31m \n Se porneste CH 2 core ..\033[0m"
	cd /usr/home/game/channel2/core1
	env LD_32_PRELOAD=/usr/home/game/lib/LibCostume.so ./gamecore1 &
	sleep 2
	clear
	cd /usr/home/game/game99/
	env LD_32_PRELOAD=/usr/home/game/lib/LibCostume.so ./gamecore99 &
	sleep 2
	clear
	echo -e "\033[32m \n Ch1 Si Ch2 Au fost Pornite astapta 30 secunde!\033[0m"
;;
esac
Avatar utilizator
Moț
Ţepar / Untrusted User

Ţepar / Untrusted User
Mesaje: 2825
Membru din: 03 Apr 2017, 15:00
Aprecieri: 216  
Mulţumiri: 3040  
Discord: Copiază ID
Medalii

Inactiv,arhivat !
Imagine
Afișează semnătura
Închis
Răspunsuri
7
Vizualizări
822
Răspunsuri
5
Vizualizări
315
Răspunsuri
12
Vizualizări
1034

Înapoi la “Arhivă Probleme şi Întrebări”

  • Informaţie
  • Cine este conectat

    Utilizatori ce ce navighează pe acest forum: Niciun utilizator înregistrat și 18 vizitatori