如果将变量放入printf(1)
格式字符串中, ShellCheck会发出警告。为什么?
是:
printf "$file does not exist\n"
在某些方面不如:
printf "%s does not exist\n" "$file"
如果将变量放入printf(1)
格式字符串中, ShellCheck会发出警告。为什么?
是:
printf "$file does not exist\n"
在某些方面不如:
printf "%s does not exist\n" "$file"