例如:
#!/bin/bash myFunction { echo $1 echo $2 echo $3 } myFunction "firstString" "second string with spaces" "thirdString"
运行时,我期望的输出是:
firstString second string with spaces thirdString
然而,实际输出是:
firstString second string
有没有办法传递带有空格的字符串作为bash中的函数的单个参数?