Perplexed

トップ ページ
添付ファイル:
Eメールのメッセージ
+ (text/plain)
このメッセージを削除
このメッセージに返信
著者: Kevin Buettner
日付:  
題目: Perplexed
On Feb 28, 4:26pm, Michael Havens wrote:

> Why would I have a file, uniq the output, have the output redirected to a
> file, and the file be blank when I tried to look at it?

[...]
> [bmike1@localhost training]$ uniq test-sor >test-sor
> [bmike1@localhost training]$ more test-sor


Because the file is truncated by the shell before ``uniq'' gets to operate
on it. By the time ``uniq'' opens it, it's already empty.

Kevin