#!/bin/bash
branch=$1
vcva=$2
esx=$3
pxe=$4
setup=$5
#If branch is Vsphere-2015
if [ "$branch" == "vsphere2015"];then
echo " Running Bats for Vsphere-2015 with the following details ."
if [ ! "vcva" ];then
echo "VCVA Build is $2 "
echo "ESX Build is $4 "
echo "pxe info is $5 "
#If all the setups has to be run
setup=$5
case "$setup" in "all")
echo "runnning all setups on Vsphere-2015."
vpshere2015_primary
vpshere2015_M1N1
vpshere2015_M2N1 =======> these are methods
vpshere2015_legacy
;;
I'm new to shell and after this piece of code getting
bat.sh: line 38: syntax error near unexpected token newline'
'at.sh: line 38: ;;
I want to run some functions depending upon the inputs given by the user in command line
]--[ "$branch" == "vsphere2015"]should be[ "$branch" == "vsphere2015" ]. The reason: the[command demands its last argument must be], and arguments are separated by whitespace.