gpt4 book ai didi

linux - 如何在新行中传递每个 shell 参数

转载 作者:塔克拉玛干 更新时间:2023-11-03 00:54:05 24 4
gpt4 key购买 nike

我有一个带 3 个参数的 shell 脚本

test.sh a b c

我想给每个参数换行

像这样的东西:

test.sh a
b
c

我在 AIX 上谢谢。

最佳答案

只需将 \ 放在行尾,它就会“转义”其后字符的含义,在本例中为换行符。

test.sh a \
b \
c

关于linux - 如何在新行中传递每个 shell 参数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28098743/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com