How To Use opt In Bash Script,Example This is an exmaple of how to create bash script with Opt in. #!/bin/bash echo “Select no. for option” OPTIONS=”Hello LinuxTribe Quit” select opt in $OPTIONS; do if [ “$opt” = “Quit” ]; then echo done exit elif [ “$opt” = “Hello” ]; then echo Hello World elif […]
Linux
How To Use case in Bash Script, Example
How To Use case in Bash Script, Example This is only an example. #/bin/bash echo “Give Full Path where the file is located” read pth echo “Give the file name” read fle if [ -f $pth/$fle ];then echo “$fle file is found in $pth” else echo “$fle file not found in $pth” echo “U r […]
NonInteractive apt-get install in Debian
In this post, we will know how to do noninteractive apt-get install in Debian Operating System. By this method you can skip the interactive query ask while doing apt-get install . For eg. on doing apt-get -y install nagios-nrpe-server , the samba and dhcp packages also install and at that time it need user manual […]
Xen Virtual Machine Migration (In Hyper-VM)
In this post, we will learn about how to do Xen Virtual Machine migration from one Host Base Machine to other. We hope you know how to create a Virtual Machine in Xen. Our both host machines had the same specs and same LVM management. Here LVM Management means in both host machine we have […]
How to install and configure DHCP server on RHEL 5
Dynamic Host Configuration Protocol (DHCP) is a client/server protocol helps to assign ip address automatically and dynamically to client machine.In this post we will learn how to install and configure DHCP server in RHEL 5. Note: DHCP runs on UDP port 67 for the DHCP serve and UDP port 68 for the DHCP client machines. […]
sed: -e expression #1, char 24: Invalid range end
While working on sed command stricken with this, error : “sed: -e expression #1, char 24: Invalid range end “). To solve this problem, we have used sed and tr command. We made a bash script having expect command in it. We were passing variable value from my mysql database into the bash script. The […]