FastHandle - IT Operations Examples

FastHandle is fast operation tools for infrastructure configurations and tests.

User Tools

Site Tools


operation:one-line-task.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
operation:one-line-task.html [2020/01/23 01:18]
kurihara
operation:one-line-task.html [2020/01/23 02:14]
kurihara
Line 68: Line 68:
 $ fab -H $H  -- sudo route del -net 192.168.10.0 netmask 255.255.255.0 $ fab -H $H  -- sudo route del -net 192.168.10.0 netmask 255.255.255.0
 $ fab -H $H  -- sudo cp -p /etc/sysconfig/static-routes /etc/sysconfig/static-routes.`date -d '1day ago' +%Y%m%d` $ fab -H $H  -- sudo cp -p /etc/sysconfig/static-routes /etc/sysconfig/static-routes.`date -d '1day ago' +%Y%m%d`
-$ fab -H $H  -- sudo "sed s/192.168.100.10/192.168.50.10/g /etc/hosts > /etc/hosts.`date -d +%Y%m%d`" + 
-$ fab -H $H  -- sudo "echo "any host 192.168.100.1 gw 192.168.0.5" >> /etc/sysconfig/static-routes+$ fab -H $H  -- sudo sed -i s/192.168.100.10/192.168.50.10/g /etc/hosts 
-$ fab -H $H  -- sudo "echo 'any host 192.168.100.1 gw 192.168.0.5>> /etc/sysconfig/static-routes"+ 
 +$ fab -H $H  -- "sudo bash -c 'sed s/192.168.100.10/192.168.50.10/g /etc/hosts > /etc/hosts.`date -d +%Y%m%d`  '
 +$ fab -H $H  -- "sudo bash -c 'echo "any host 192.168.100.1 gw 192.168.0.5>> /etc/sysconfig/static-routes  '"
 </sxh> </sxh>
  


operation/one-line-task.html.txt · Last modified: 2020/01/23 02:18 by kurihara