Добавлен READ.ME для BASH
This commit is contained in:
parent
74efca432d
commit
7122d616e2
5
snipplets/code/Bash/README.md
Normal file
5
snipplets/code/Bash/README.md
Normal file
@ -0,0 +1,5 @@
|
||||
# Bash & Unix Shell
|
||||
|
||||
* [UnixSocket сервер на `nc`](unix-socket-server.sh)
|
||||
* [Проверка наличия команды](command_exists.s)
|
||||
* [Проверка наличия файла/директории](file_folder_exists.sh)
|
@ -5,6 +5,8 @@ if ! [ -x "$(command -v git)" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# OR
|
||||
|
||||
if ! command -v crystal &> /dev/null
|
||||
then
|
||||
echo "<the_command> could not be found"
|
||||
|
@ -9,6 +9,8 @@ else
|
||||
echo "$FILE does not exist."
|
||||
fi
|
||||
|
||||
# OR
|
||||
|
||||
[ -f /etc/resolv.conf ] && echo "/etc/resolv.conf exists."
|
||||
|
||||
# Check directory exists
|
||||
@ -18,4 +20,6 @@ if [ -d "$DIR" ]; then
|
||||
echo "$DIR is a directory."
|
||||
fi
|
||||
|
||||
# OR
|
||||
|
||||
[ -d /etc/docker ] && echo "/etc/docker is a directory."
|
||||
|
@ -1,5 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
# TODO: Добавить описание
|
||||
# TODO: Добавить в README.md
|
||||
|
||||
# https://linuxconcept.com/making-a-simple-irc-chat-bot-logger-using-bash-script/
|
||||
|
||||
nick="blb$$"
|
||||
|
@ -1,5 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# TODO: Добавить описание и пример работы
|
||||
|
||||
# TCP
|
||||
# coproc nc -l localhost 3000
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user