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 | ||
|
preparation:fhhome:fhghost.html [2017/11/18 22:55] kurihara ↷ Page name changed from preparation:fhhost.html to preparation:fhghost.html |
preparation:fhhome:fhghost.html [2019/02/12 23:28] (current) kurihara |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== fhghost.sh ====== | + | [[: |
| + | ====== | ||
| + | |||
| + | \\ | ||
| + | {{INLINETOC}} | ||
| + | \\ | ||
| + | |||
| + | |||
| + | ===== Operation ===== | ||
| + | <sxh bash toolbar: | ||
| + | $ fhghost.sh | ||
| + | |||
| + | $ fhghost.sh | ||
| + | $ fhghost.sh | ||
| + | $ fhghost.sh | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | \\ | ||
| + | ===== fhghost.sh ===== | ||
| + | $FHHOME/ | ||
| <sxh bash toolbar: | <sxh bash toolbar: | ||
| #!/bin/bash | #!/bin/bash | ||
| # | # | ||
| - | # FastHandle Grep Host | + | # fhghost.sh |
| # | # | ||
| - | # fhgh.sh " | + | # How to use |
| - | # fhgh.sh PATTERN FILE like grep PATTERN FILE | + | # |
| + | # | ||
| + | # | ||
| + | # | ||
| + | # pipe to Fabric | ||
| + | # | ||
| + | # | ||
| + | # fhghost.sh PATTERN FILE |fab xxx < | ||
| # | # | ||
| # | # | ||
| - | case " | + | help(){ |
| - | -a | --all | -t | --test | + | cat << @ |
| - | | + | Example |
| - | shift | + | |
| - | ;; | + | |
| - | -h | --help ) | + | |
| - | echo " | + | @ |
| - | | + | } |
| - | | + | |
| - | esac | + | |
| + | if [ " | ||
| + | help | ||
| + | exit 0 | ||
| + | fi | ||
| - | PATTERN=" | ||
| - | FILE=" | ||
| - | if [ "$FLG" = "TRUE" ]; then | + | if [ "$#" |
| - | | + | |
| - | else | + | |
| - | | + | -h | --help ) |
| + | help | ||
| + | exit 0 | ||
| + | ;; | ||
| + | * ) | ||
| + | FILE="$1" | ||
| + | grep -Ev " | ||
| + | ;; | ||
| + | esac | ||
| fi | fi | ||
| + | if [ " | ||
| - | exit 0 | + | case " |
| + | -a | --all | -t | --test | -v ) | ||
| + | FILE=" | ||
| + | grep -Ev " | ||
| + | ;; | ||
| + | * ) | ||
| + | PATTERN=" | ||
| + | FILE=" | ||
| + | grep -Ev " | ||
| + | ;; | ||
| + | esac | ||
| + | fi | ||
| </ | </ | ||
| + | \\ | ||
| + | <WRAP box 90%> | ||
| + | [[: | ||
| + | <catlist ..: -noAddPageButton -noHead> | ||
| + | </ | ||
| + | \\ | ||
| + | [[: | ||
My Sites
SNS
Copyright (c) 2025 FastHandle - IT Operations Examples All Rights Reserved.