Add my OS infomation:Linux Fedora 10.

在2009-04-13 15:45:54,maguowei2723 <[email protected]> 写道:

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

 
 





网易邮箱,中国第一大电子邮件服务商
_______________________________________________
Bug-coreutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to