[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
Bash
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 15
Thread images: 1
File: bin-bash-extended.sh-600x600.png (17 KB, 600x600) Image search: [Google]
bin-bash-extended.sh-600x600.png
17 KB, 600x600
Find error pls :D [Znajdż błąd proszę :D]

#!/bin/bash
KONIEC="x";
function wybor
{
case $KONIEC in
s) echo "jestes w katalogu: $(pwd)";;
p) echo "teraz wypiszę wszystkie twoje procesy";
ps-e;;
w) echo "oto lista plików w tym katalogu";
ls;;
esac;
}
function menu
{
until [$KONIEC=k] do;
echo "Wcisnij enter aby kontynuowac";
read;
clear;
echo $KONIEC;
echo "proste menu";
echo;
echo "s-wyswietl sciezke w ktorej znajduje sie skrypt.";
echo "p-wyswietl liste procesow uzytkownika.";
echo "w-wyswietl wszystkie pliki w tym katalogu.";
echo "k-zakoncz skrypt.";
read KONIEC;
wybor;
done
}
menu;
>>
Check out shellcheck.
>>
At a glance
>[$KONIEC=k]
should be
>[ $KONIEC = k ]
>>
TY ill try this
>>
nope dont work

./pierwszyy.sh: line 28: syntax error near unexpected token `done'
./pierwszyy.sh: line 28: ` done'
>>
>>54938228
>until [$KONIEC=k] do;
>until [ $KONIEC = k ]; do;
>>
nope.

./pierwszyy.sh: line 15: syntax error near unexpected token `;'
./pierwszyy.sh: line 15: ` until [ $KONIEC = k ]; do;'
>>
naucz sie pisac skrypty chuju
>>
>>54938274
:D
>>
until [ $KONIEC = k ] ; do
>>
>54938124
Technikum i systemy operacyjne na linuxie, prawda? Przygotowania do E12?
>>
>>54938334
O_O tak :D
>>
>>54938324
Ty bro its working :)
>>
>>54938340
bo właśnie słyszałem, że na egzaminie mają być skrypty, nauczyciele podobno strasznie się boją, bo nikt tego nie robił w ciągu roku, a teraz doszły wymagania XD
>>
>>54938385
no tak jest moge to potwierdzić xD
Thread replies: 15
Thread images: 1

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.