2013-03-21 63 views
2

我可以这样做:猛砸这里文档<< - 跳过前面的空格

declare foo -r -d '' <<- 'EOF' 
->-> Sopra la panca 
->-> la capra campa 
EOF 

(其中->表示TAB)

然后领先的标签将被忽略。

可以使用<<-跳过/忽略前导space s,而不仅仅是tab s?

+3

号仅领先的制表符将被剥离。阅读约翰王子的“man”页面 – 2013-03-21 02:18:21

+0

,我认为这应该是一个回答,而不是评论。 – 2013-04-02 07:56:16

回答

0

引述 from Greg

 
In this form, all leading tab characters (not spaces!) will be removed. There is 
no provision for removing leading spaces, or leading tabs-and-spaces. (Recall the 
syntactic restrictions of Makefiles, and you'll be OK.)