echo:会在shell中显示echo这条命令和这条命令的输出结果
@echo:不会在shell中显示echo这条命令,但是会显示命令的输出结果
例如:
echo_test:
echo "hello world"
echo_test_with_address:
@echo "hello world"
echo_test的输出结果为:

echo_test_with_address的输出结果为:

本文详细解释了Shell环境下的echo命令的使用方法,包括其显示行为的两种模式:一种是在执行时显示命令及其输出,另一种仅显示命令的输出结果而不显示命令本身。通过具体示例,帮助读者理解如何在脚本中灵活运用echo命令。
echo:会在shell中显示echo这条命令和这条命令的输出结果
@echo:不会在shell中显示echo这条命令,但是会显示命令的输出结果
例如:
echo_test:
echo "hello world"
echo_test_with_address:
@echo "hello world"
echo_test的输出结果为:

echo_test_with_address的输出结果为:

3016

被折叠的 条评论
为什么被折叠?