[maccess] help update

:Release Notes:
-

:Detailed Notes:
-

:Testing Performed:
-

:QA Notes:
-

:Issues Addressed:
-
This commit is contained in:
Artur Mukhamadiev 2025-10-01 13:47:20 +03:00
parent 200e4fef6c
commit e7c63c9462

View File

@ -10,12 +10,12 @@ jump=""
lock_file="lock.mutex"
usage() {
echo "Usage: $0 [-p PORT -J jump1,jump2] user@host"
echo "Usage: $0 [-p PORT -J jump1,jump2 -u YourName] user@host"
exit 1
}
# Parse command line options
while getopts ":p:J:u:" opt; do
while getopts ":p:J:u:h" opt; do
case $opt in
p)
if ! [[ "$OPTARG" =~ ^[0-9]+$ ]] || [ "$OPTARG" -gt 65535 ]; then
@ -31,6 +31,9 @@ while getopts ":p:J:u:" opt; do
u)
user="$OPTARG"
;;
h)
usage
;;
\?)
echo "Invalid option: -$OPTARG"
usage