如何将命令行参数传递给bash函数?
代码:
#/bin/bash
arg = "$1"
display_success() {
echo -e "\nSuccessfully created new response chart for the $1 client."
sleep 1
echo -e "Set up Firebase Production environment.\n"
}
display_success "$arg"
我不断得到
的结果Successfully created new response chart for the client.
注意空格。