小编lsc*_*ann的帖子

Shell 脚本输出缩进

我想在另一个脚本中调用一个 shell 脚本/应用程序。包含的脚本的每一行都应该缩进 2 个空格。这可能吗?

输出应该是这样的。

I'm the main-scripts' output.
  I'm a second script, called inside the main-script.
  Every line of my output is indented by 2 spaces.
  This is not implemented inside of me, but in the main-script
  as I should also be called outside of the main-script and then
  my output shouldn't be indented.
Thats all from the second script.
Run Code Online (Sandbox Code Playgroud)

这是可能的吗?

linux unix shell format

5
推荐指数
2
解决办法
4837
查看次数

标签 统计

format ×1

linux ×1

shell ×1

unix ×1