#!/bin/bash
echo "What is the vendor? (DELL or CISCO)" #this is an example for reference
read VENDOR #this is an example for reference
if [ "$VENDOR" = "DELL" ]; then
echo "Step 1: Configuring DELL switch..."
# DELL-specific commands go here
elif [ "$VENDOR" = "CISCO" ]; then
echo "Step 1: Configuring CISCO switch..."
# CISCO-specific commands go here
else
echo "Invalid vendor entered. Exiting script."
exit 1
fi
if [ "$VENDOR" = "DELL" ]; then
echo "Step 2: Configuring DELL router..."
# DELL-specific commands go here
elif [ "$VENDOR" = "CISCO" ]; then
echo "Step 2: Configuring CISCO router..."
# CISCO-specific commands go here
fi
if [ "$VENDOR" = "DELL" ]; then
echo "Step 3: Configuring DELL firewall..."
# DELL-specific commands go here
elif [ "$VENDOR" = "CISCO" ]; then
echo "Step 3: Configuring CISCO firewall..."
# CISCO-specific commands go here
fi
if [ "$VENDOR" = "DELL" ]; then
echo "Step 4: Configuring DELL VPN..."
# DELL-specific commands go here
elif [ "$VENDOR" = "CISCO" ]; then
echo "Step 4: Configuring CISCO VPN..."
# CISCO-specific commands go here
fi
if [ "$VENDOR" = "DELL" ]; then
echo "Step 5: Configuring DELL WAN..."
# DELL-specific commands go here
elif [ "$VENDOR" = "CISCO" ]; then
echo "Step 5: Configuring CISCO WAN..."
# CISCO-specific commands go here
fi
echo "Script completed successfully."
please don't focus on the content of the script but rather on the type of script.
I want an efficient way (fewer lines of code) to run 5+ steps where each step executes different variations of the same actions based on the value of $Var1 (in this example $VENDOR)