2016-12-24 5 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のは、特殊文字を考慮していないように言われている印刷します。

echoに-nパラメータを使用して、必要な効果を得ることができます。

関連する問題