FastHandle - IT Operations Examples

FastHandle is fast operation tools for infrastructure configurations and tests.

User Tools

Site Tools


preparation:fhhome:fhghost.html



Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
preparation:fhhome:fhghost.html [2018/01/02 01:21]
kurihara
preparation:fhhome:fhghost.html [2019/02/11 00:54]
kurihara
Line 1: Line 1:
 [[:index.html#Preparation|Top#Preparation]] [[:index.html#Preparation|Top#Preparation]]
-====== $FHHOME/fhscripts/fhghost.sh ======+====== $FHLINUX/fhscripts/fhghost.sh ====== 
 + 
 +\\ 
 +{{INLINETOC}} 
 +\\
  
  
Line 6: Line 10:
 <sxh bash toolbar:false gutter:false> <sxh bash toolbar:false gutter:false>
 $ fhghost.sh  -h $ fhghost.sh  -h
-$ fhghost.sh  FILE + 
-$ fhghost.sh  "*"  hosts/xxxx +$ fhghost.sh  FILE  |fab  -- hostname 
-$ fhghost.sh  PATTERN FILE+$ fhghost.sh  "*"  hosts/xxxx  |fab  -- hostname 
 +$ fhghost.sh  PATTERN FILE  |fab  -- hostname
 </sxh> </sxh>
  
Line 23: Line 28:
 # #
 # How to use # How to use
-   fhghost.sh  -h +  Help 
-   fhghost.sh  FILE +#     fhghost.sh  -h 
-   fhghost.sh  "*"  hosts/xxxx    <- like grep PATTERN FILE +  Test 
-   fhghost.sh  PATTERN FILE       <- like grep PATTERN FILE+#     fhghost.sh -a FILE 
 +#   pipe to Fabric 
 +#     fhghost.sh  FILE | fab xxx 
 +    fhghost.sh  "*"  hosts/xxxx |fab xxx  <- like grep PATTERN FILE 
 +    fhghost.sh  PATTERN FILE |fab xxx     <- like grep PATTERN FILE
 # #
 #=========================================================== #===========================================================
  
 help(){ help(){
-    echo  "Exxample:" +cat << @ 
-    echo  "fhghost.sh  FILE" +Example 
-    echo  "fhghost.sh  PATTERN FILE" +  fhghost.sh  FILE 
-    echo  "fhghost.sh  "*" FILE"+  fhghost.sh  PATTERN FILE 
 +  fhghost.sh  "*" FILE 
 +@
 } }
  
Line 49: Line 60:
             help             help
             exit 0             exit 0
-            ;; 
-        -a | --all | -t | --test | -v ) 
-            FILE="$1" 
-            grep -Ev "^#|^$" "${FILE}" 
             ;;             ;;
         * )         * )


preparation/fhhome/fhghost.html.txt · Last modified: 2019/02/12 23:28 by kurihara