and thanks in advance for your help!
I'm having an issue with a piece of code I'm writing to automate the setup of Homebrew on my Mac. Here's the code I currently have:
#!/usr/bin/env bash
brew="
app1 test
app2
app3
"
for i in $brew; do
echo brew install $i
done
My expected output is this:
brew install app1 test
brew install app2
brew install app3
But, the actual output of the script is this:
brew install app1
brew install test
brew install app2
brew install app3
I've tried quoting both the "i" and "$brew" commands in my loop with no results. If anyone has any potential solutions, please share them! Thanks!