Тренировка на паре

This commit is contained in:
Виталий Туров 2024-11-27 20:44:09 +03:00
parent 794a8c32c6
commit 773f8d990a
2 changed files with 20 additions and 8 deletions

View File

@ -1,12 +1,17 @@
#!/bin/bash
foo="help"
internakCall() {
local foo='error'
echo 'Вызов HTTP сервера GET'
return 10
outer() {
local count=0
inner() {
count=$(($count + 1))
echo $count
}
}
res=`internakCall`
echo $?
outer
outer
outer
outer
# res=outer
# count=$(res)

7
bash/train_bash/rest.sh Executable file
View File

@ -0,0 +1,7 @@
#!/bin/bash
while true; do {
echo -ne "HTTP/1.0 200 OK\r\n
Content-Length: \$(wc -c <index.htm)\r\n\r\n";
} | nc -l -p 8080 ;
done