Добавлен READ.ME для BASH

This commit is contained in:
Alexander Popov 2023-09-10 01:13:40 +03:00
parent 74efca432d
commit 7122d616e2
Signed by: iiiypuk
GPG Key ID: E47FE0AB36CD5ED6
5 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,5 @@
# Bash & Unix Shell
* [UnixSocket сервер на `nc`](unix-socket-server.sh)
* [Проверка наличия команды](command_exists.s)
* [Проверка наличия файла/директории](file_folder_exists.sh)

View File

@ -5,6 +5,8 @@ if ! [ -x "$(command -v git)" ]; then
exit 1 exit 1
fi fi
# OR
if ! command -v crystal &> /dev/null if ! command -v crystal &> /dev/null
then then
echo "<the_command> could not be found" echo "<the_command> could not be found"

View File

@ -9,6 +9,8 @@ else
echo "$FILE does not exist." echo "$FILE does not exist."
fi fi
# OR
[ -f /etc/resolv.conf ] && echo "/etc/resolv.conf exists." [ -f /etc/resolv.conf ] && echo "/etc/resolv.conf exists."
# Check directory exists # Check directory exists
@ -18,4 +20,6 @@ if [ -d "$DIR" ]; then
echo "$DIR is a directory." echo "$DIR is a directory."
fi fi
# OR
[ -d /etc/docker ] && echo "/etc/docker is a directory." [ -d /etc/docker ] && echo "/etc/docker is a directory."

View File

@ -1,5 +1,8 @@
#!/bin/bash #!/bin/bash
# TODO: Добавить описание
# TODO: Добавить в README.md
# https://linuxconcept.com/making-a-simple-irc-chat-bot-logger-using-bash-script/ # https://linuxconcept.com/making-a-simple-irc-chat-bot-logger-using-bash-script/
nick="blb$$" nick="blb$$"

View File

@ -1,5 +1,7 @@
#!/bin/bash #!/bin/bash
# TODO: Добавить описание и пример работы
# TCP # TCP
# coproc nc -l localhost 3000 # coproc nc -l localhost 3000