2013-03-21 41 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.)