How To Use opt In Bash Script

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 … Read more

How to Use Expect In Bash Script

expect bash

In this bash script we will use expect scripting. Expect is known primarily as an indispensable application for system administrators. We use expect generally in case where input from user is required , for eg. ssh, ftp, telnet, sudo etc. Given below is sample bash script which will first ssh the remote host and then … Read more