小编Iur*_*uda的帖子

如何在鱼壳的字符串中换行?

与如何在 sh 的字符串中添加换行符是同样的问题 ? 但在鱼壳里。

在 bash 中我们有:

$'this is line\nthis is another line'

谁产生了预期的结果,但在鱼中这不起作用。

鱼有类似的方法吗?

编辑1:

faho 明智地提到了字面方法:

'this is line this is another line'

\n但我真的很好奇是否存在像 shell 中那样保留换行符引用的方法。

我想知道是否可以使用这个字符串"this is a line\nthis is another line"来确保鱼将其视为\n换行符而不是文字。

string line-breaks fish

8
推荐指数
1
解决办法
5642
查看次数

标签 统计

fish ×1

line-breaks ×1

string ×1