bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bug report of tr command.


From: maguowei2723
Subject: Bug report of tr command.
Date: Mon, 13 Apr 2009 15:45:54 +0800 (CST)

Dear guys,
   I am a software testing engineer of China.Recently,I am studying the skills 
of Linux.When I try to do some exercises with "tr" command,I encounter a 
problems.
 
the detail infomation is here:
I want to replace all the word of "root" to "administrator" in test.txt file.I 
get a bit part of the file:
 
root         1  0.0  0.1   2008   768 ?        Ss   21:03   0:03 /sbin/init
root         2  0.0  0.0      0     0 ?        S<   21:03   0:00 [kthreadd]
root         3  0.0  0.0      0     0 ?        S<   21:03   0:00 [migration/0]
root         4  0.0  0.0      0     0 ?        S<   21:03   0:00 [ksoftirqd/0]

yeah,but when I finish the replace by execute command---- tr 'root' 
'administrator' < test.txt
I found the result is not the same with my expected.
 
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
ammi         1  0.0  0.1   2008   768 ?        Ss   21:03   0:03 /sbin/inii
ammi         2  0.0  0.0      0     0 ?        S<   21:03   0:00 [kihaeadd]
ammi         3  0.0  0.0      0     0 ?        S<   21:03   0:00 [migaaiimn/0]
ammi         4  0.0  0.0      0     0 ?        S<   21:03   0:00 [ksmfiiaqd/0]
 
Yeah,maybe the word is too long,so it was trucate to admi,but the result is 
ammi.
 
I don't know why this happen,and I cannot find a reasonable answer about it 
from internet.So maybe it is a problem.
 
whatever,expect your reply.
 
your friend,
    Mark Ma(China Beijing)
Mobile: 13601138742

 
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]