Posts

Showing posts from May, 2013

Script to create bridge for KVM configuration

#!/bin/bash brctl addbr br0 ifconfig br0 9.126.138.64 netmask 255.255.255.0 up route add default gw 9.126.138.1 br0 ifconfig eth0 0.0.0.0 up brctl addif br0 eth0

Grep with exact match

 df -TH |grep -i '/$'  ---> exact match

Add proxy server setting in wget

wget http://sourceforge.net/projects/sshpass/files/latest/download --proxy-user=USERNAME --proxy-password=PASSWORD  Create a file as below davinder ~]# vi /root/.wgetrc  HTTP_PROXY=PROXYSERVER-IP:PORT-NO

Crontab issue

I am getting right output through manually execute the script but got issue when I was running in crontab. In crontab it was giving me different output (not expected) . I have added below lines in crontab -e SHELL=/bin/bash PATH=/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin Now it is working fine. Thanks