This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
средства_программирования_shell [2023/03/14 07:30] val [Целочисленный цикл (поиск хостов в подсети)] |
средства_программирования_shell [2024/03/12 17:27] val [Web сервер на shell] |
||
---|---|---|---|
Line 87: | Line 87: | ||
#!/bin/sh | #!/bin/sh | ||
- | test -z $1 && exit 1 | + | #test -z $1 && exit 1 |
+ | #[ "$1" ] || { echo Example: ./test_ping.sh 10.5.11; exit 1; } | ||
i=1 | i=1 | ||
Line 420: | Line 421: | ||
/bin/cat "$filename" | /bin/cat "$filename" | ||
else | else | ||
- | # echo "$(date)" ERR $filename on "$(hostname)" >> $log | + | # echo "$(date)" ERR $filename on "$(hostname)" >> "$log" |
echo -e "HTTP/1.1 404 Not Found\r" | echo -e "HTTP/1.1 404 Not Found\r" | ||
echo -e "Content-Type: text/html;\r" | echo -e "Content-Type: text/html;\r" |