日期:2014-05-19  浏览次数:20809 次

如何解析一个txt文件,获取有用字段.
本帖最后由 wallisnow 于 2013-01-20 23:07:26 编辑
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.0   3536  1288 ?        Ss   08:06   0:00 /sbin/init
root         2  0.0  0.0      0     0 ?        S    08:06   0:00 [kthreadd]
root         3  0.0  0.0      0     0 ?        S    08:06   0:05 [ksoftirqd/0]
root         6  0.0  0.0      0     0 ?        S    08:06   0:01 [migration/0]
root         7  0.0  0.0      0     0 ?        S    08:06   0:00 [watchdog/0]
root         8  0.0  0.0      0     0 ?        S    08:06   0:00 [migration/1]
root        10  0.0  0.0      0     0 ?        S    08:06   0:05 [ksoftirqd/1]
root        12  0.0  0.0      0     0 ?        S    08:06   0:00 [watchdog/1]
root        13  0.0  0.0      0     0 ?        S<   08:06   0:00 [cpuset]
root        14  0.0  0.0      0     0 ?        S<   08:06   0:00 [khelper]
root        15  0.0  0.0      0     0 ?        S    08:06   0:00 [kdevtmpfs]
root        16  0.0  0.0      0     0 ?        S<   08:06   0:00 [netns]
root        18  0.0  0.0      0     0 ?        S    08:06   0:00 [sync_supers]