FastHandle is fast operation tools for infrastructure configurations and tests.
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
fhscripts:fh:fhssh.sh.html [2018/01/20 22:19] kurihara |
fhscripts:fh:fhssh.sh.html [2019/02/12 23:20] (current) kurihara |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| [[: | [[: | ||
| - | ====== fhssh.sh | + | ====== |
| $FHHOME/ | $FHHOME/ | ||
| Line 8: | Line 8: | ||
| - | ===== Operation ===== | + | ===== fhssh.sh |
| <sxh bash toolbar: | <sxh bash toolbar: | ||
| - | $ fhssh.sh auth.pro 192.168.0.10 | + | $ fhssh.sh |
| + | $ fhssh.sh -H 192.168.0.11 auth.stg | ||
| </ | </ | ||
| == Application Example == | == Application Example == | ||
| <sxh bash toolbar: | <sxh bash toolbar: | ||
| - | ~]$ fhssh.sh -h | + | ~]$ fhssh.sh -l |
| How to use | How to use | ||
| - | fhssh.sh | + | fhssh.sh |
| - | fhssh.sh | + | fhssh.sh |
| - | fhssh.sh | + | fhssh.sh |
| - | fhssh.sh | + | fhssh.sh |
| - | fhssh.sh | + | fhssh.sh |
| ~]$ | ~]$ | ||
| </ | </ | ||
| Line 36: | Line 37: | ||
| # | # | ||
| # How to use | # How to use | ||
| - | # fhssh.sh | + | # fhssh.sh |
| + | # fhssh.sh | ||
| + | # fhssh.sh | ||
| + | # fhssh.sh | ||
| # | # | ||
| HELP () { | HELP () { | ||
| echo "How to use" | echo "How to use" | ||
| - | cat $0 |grep auth |grep " | + | cat $0 |grep auth |grep " |
| exit 0 | exit 0 | ||
| } | } | ||
| - | AUTH=$1 | + | ERROR () { |
| - | HOST=$2 | + | echo "" |
| + | echo ' | ||
| + | echo "" | ||
| + | } | ||
| - | case ${AUTH} in | + | case ${1} in |
| -h|-l) HELP | -h|-l) HELP | ||
| ;; | ;; | ||
| esac | esac | ||
| - | + | if [ -z ${3} ]; then | |
| - | # ------------------------------------------ | + | ERROR |
| - | if [ -z ${HOST} ]; then | + | |
| - | | + | |
| - | echo 'ERROR: HOST is null' | + | |
| - | echo "" | + | |
| HELP | HELP | ||
| exit 1 | exit 1 | ||
| fi | fi | ||
| + | case ${1} in | ||
| + | -H) : | ||
| + | HOST=$2 | ||
| + | AUTH=$3 | ||
| + | ;; | ||
| + | *) : | ||
| + | ERROR | ||
| + | HELP | ||
| + | exit 1 | ||
| + | ;; | ||
| + | esac | ||
| # | # | ||
| Line 146: | Line 160: | ||
| SRX | SRX | ||
| ;; | ;; | ||
| - | *) HELP | ||
| - | exit | ||
| - | ;; | ||
| esac | esac | ||
| Line 158: | Line 169: | ||
| \\ | \\ | ||
| <WRAP box 90%> | <WRAP box 90%> | ||
| - | <catlist -noAddPageButton -smallHead -sortAscending | + | < |
| </ | </ | ||
My Sites
SNS
Copyright (c) 2025 FastHandle - IT Operations Examples All Rights Reserved.