How can I inject multiple arguments into a Bash shell script? For example, I have the following code.
script.sh#!/bin/bash
dir1="foo"
dir2="bar"
echo "Comparing $dir1 to $dir2..."
Now, I want to run this same script again. Only this time, replacing "foo" and "bar" with "baz" and "bat". Like so.
script.sh#!/bin/bash
dir1="baz"
dir2="bat"
echo "Comparing $dir1 to $dir2..."
How can I accomplish all this with a single while
loop?