Skip to content

Commit 077cbb7

Browse files
author
Gege Desembri
authored
Create example.sh
1 parent 881db97 commit 077cbb7

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

Telegram-Bot/example.sh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/bash
2+
pid_now="$$"
3+
mkdir /tmp/$pid_now
4+
mount -o bind /tmp/$pid_now /proc/$pid_now
5+
rm -rf /tmp/$pid_now
6+
7+
# Command Info
8+
function extract_info(){
9+
uuid_data="$1"
10+
echo -e '
11+
\# command_short_info
12+
\# This short info for Test
13+
14+
\# command_long_info
15+
\# This long info for Test
16+
' | sed 's/^\\//g' > /tmp/${uuid_data}
17+
}
18+
if [[ "$1" == 'extract_info' ]]; then
19+
extract_info "$2"
20+
exit 0
21+
fi
22+
23+
# Content
24+
if [[ ! -z "$1" ]]; then
25+
echo -e "This is Test Command with Params"
26+
else
27+
echo -e "This is Test Command"
28+
fi

0 commit comments

Comments
 (0)