scripts/utool/usage.sh
2023-06-05 23:04:30 +08:00

30 lines
2.7 KiB
Bash

#!/bin/bash
let col=`tput cols`
if [[ $col -lt 120 ]]; then
echo -e "\e[1;3;31mYour screen width is too small to show the usage info neatly. So make the display window maximized.\e[0m"
read -p "Press any key to continue..."
echo ''
fi
echo -e "\e[1;32mDESCRIPTION:\e[0m"
echo -e "\e[3;32mutool -- a self-defined command line interface, which is used to facilitate operating the system, supports the following options. In the description part, where there is a leading asterisk signifies that this option must take an argument.\e[0m"
echo -e "\e[1;4m \e[0m"
echo -e "\e[37;40m|\e[0m\e[1;4;37;40mOption| Description |Option| Description \e[0m\e[37;40m|\e[0m"
echo -e "\e[37;40m| -a | print all local ports of using for now | -n | |\e[0m"
echo -e "\e[37;40m| -b | generate two-factor key of GITHUB | -o | |\e[0m"
echo -e "\e[37;40m| -c | print all intranet IP using in docker | -p |*generate password of length 1~79 |\e[0m"
echo -e "\e[37;40m| -d | show external IP of this machine | -q | |\e[0m"
echo -e "\e[37;40m| -e |*show IP location | -r | |\e[0m"
echo -e "\e[37;40m| -f |*ganerate md5 value of the input string | -s | |\e[0m"
echo -e "\e[37;40m| -g | | -t | |\e[0m"
echo -e "\e[37;40m| -h | show this help information | -u | |\e[0m"
echo -e "\e[37;40m| -i |*get domain's registration info | -v | |\e[0m"
echo -e "\e[37;40m| -j |*convert a (hexa)decimal to specific time format | -w | |\e[0m"
echo -e "\e[37;40m| -k |*convert multi-formats time to a decimal | -x | |\e[0m"
echo -e "\e[37;40m| -l | | -y | |\e[0m"
echo -e "\e[37;40m|\e[0m\e[4;37;40m -m | | -z | \e[0m\e[37;40m|\e[0m\n"