相同点:echo与printf 都是bash的内置命令
不同点:echo返回0状态,并且在标准输出输出。
printf可以返回不同状态,并且可以格式化输出。
Both echo and printf are Bash built-in commands. The first always exits with a 0 status, and simply prints
arguments followed by an end of line character on the standard output, while the latter allows for definition of
a formatting string and gives a non-zero exit status code upon failure.