feature/train_bash #7

Merged
walleri1 merged 18 commits from feature/train_bash into main 2025-02-15 12:00:00 +03:00
2 changed files with 20 additions and 8 deletions
Showing only changes of commit a568e6bb38 - Show all commits

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