在shell脚本中回显空白行的首选方法是什么? [英] What is the preferred method to echo a blank line in a shell script?

查看:58
本文介绍了在shell脚本中回显空白行的首选方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在为Shell脚本编写一些代码,该脚本的脚本的两个部分之间需要有空白行,因此在向用户显示输出时可以将它们分开.

I am currently writing some code for a shell script that needs a blank line between two parts of the script, as thus they can be separated when output is displayed to the user.

我的问题是,我不确定在shell脚本中空白行的首选做法是什么.

My question is, I am not sure what the preferred practice is in a shell script for a blank line.

是否只写 echo 而不写其他内容,或者像写回声一样在引号之间加上引号和空白,写 echo" 呢?

Is it preferred practice to just write echo and nothing else or to write echo " " as in echo with quotes and blank between the quotes?

推荐答案

echo 是首选. echo" 输出不必要的空格字符. echo" 会更好,但这不是必需的.

echo is preferred. echo " " outputs an unnecessary space character. echo "" would be better, but it's unnecessary.

这篇关于在shell脚本中回显空白行的首选方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆