2016-12-24 98 views
1
[email protected]:~$ echo "//" | xargs -0 
// 

[email protected]:~$ 

爲什麼有一個換行符在這裏?爲什麼結果不如下?爲什麼`echo「//」| xargs -0`導致換行?

[email protected]:~$ echo "//" | xargs -0 
// 
[email protected]:~$ 

男人xargs不能告訴我理由。

-0  Input items are terminated by a null character instead of by 
      whitespace, and the quotes and backslash are not special (every 
      character is taken literally). Disables the end of file string, 
      which is treated like any other argument. 

回答

1

echo打印換行和xargs的被告知不考慮特殊字符。

您可以通過使用-n參數echo得到想要的效果。

相關問題