GNU bug report logs -
#21128
Is this a BUG? Please Help Me !
Previous Next
Reported by: "liuquan" <liuquan <at> csu.edu.cn>
Date: Fri, 24 Jul 2015 15:30:05 UTC
Severity: normal
Tags: notabug
Done: Assaf Gordon <assafgordon <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 21128 <at> debbugs.gnu.org (full text, mbox):
tag 21128 notabug
close 21128
stop
On 24/07/15 09:20, liuquan wrote:
> Dear, engineer!
>
> I'm writing this E-mail to you since I think I've found something wrong in Ubuntu!
>
> My Operating System here is Ubuntu Kylin 14.04.
>
> I find a question about command 'paste' in command line.
>
> Support there is a file called "test.txt", and its content is the next 2 lines:
>
> ab
>
> cd
>
> If I run the command "paste test.txt", the content of this file will be print at STDOUT. However, when I ran the command "paste test.txt > test.txt" I found that the file "test.txt" became an empty file. Here comes the question, what's going on? Can you help me?
The shell truncated the file before paste could read it.
You need to write to a temp file first. For details see:
http://www.pixelbeat.org/docs/unix_file_replacement.html
thanks,
Pádraig.
This bug report was last modified 6 years and 214 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.