文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>工具

工具

时间:2007-07-24  来源:codfei

 



[root@localhost chap03]# sed -n l datafile

northwest\tNW\tCharles Main\t\t3.0\t.98\t3\t34\r$
western\t\tWE\tSharon Gray\t\t5.3\t.97\t5\t23\r$
southwest\tSW\tLewis Dalsass\t\t2.7\t.8\t2\t18\r$
southern\tSO\tSuan Chin\t\t5.1\t.95\t4\t15\r$
southeast \tSE\tPatricia Hemenway\t4.0\t.7\t4\t17\r$
eastern\t\tEA\tTB Savage\t\t4.4\t.84\t5\t20\r$
northeast \tNE\tAM Main Jr.\t\t5.1\t.94\t3\t13\r$
north\t\tNO\tMargot Weber\t\t4.5\t.89\t5\t 9\r$
central\t\tCT \tAnn Stephens\t\t5.7\t.94\t5\t13\r$
[root@localhost chap03]# more datafile

northwest NW Charles Main 3.0 .98 3 34
western WE Sharon Gray 5.3 .97 5 23
southwest SW Lewis Dalsass 2.7 .8 2 18
southern SO Suan Chin 5.1 .95 4 15
southeast SE Patricia Hemenway 4.0 .7 4 17
eastern EA TB Savage 4.4 .84 5 20
northeast NE AM Main Jr. 5.1 .94 3 13
north NO Margot Weber 4.5 .89 5 9
central CT Ann Stephens 5.7 .94 5 13
[root@localhost chap03]# cut -f1 datafile

northwest
western
southwest
southern
southeast
eastern
northeast
north
central
[root@localhost chap03]# cut -d: -f1,3,4 /etc/passwd

root:0:0
bin:1:1
daemon:2:2
adm:3:4
lp:4:7
sync:5:0
shutdown:6:0
halt:7:0
mail:8:12
news:9:13
uucp:10:14
operator:11:0
games:12:100
gopher:13:30
ftp:14:50
nobody:99:99
dbus:81:81
vcsa:69:69
nscd:28:28
rpm:37:37
haldaemon:68:68
netdump:34:34
sshd:74:74
rpc:32:32
rpcuser:29:29
nfsnobody:65534:65534
mailnull:47:47
smmsp:51:51
pcap:77:77
apache:48:48
squid:23:23
webalizer:67:67
xfs:43:43
ntp:38:38
gdm:42:42
htt:100:101
named:25:25
dovecot:97:97
postfix:89:89
[root@localhost chap03]# who

root tty1 Mar 29 20:38
root pts/0 Mar 30 07:31 (192.168.1.3)

[root@localhost chap03]# who | cut -c1-9

root
root
[root@localhost chap03]# who | cut -c10-17

tty1
pts/0
[root@localhost chap03]# who | cut -c18-

     Mar 29 20:38
     Mar 30 07:31 (192.168.1.3)

 

 


 

[root@localhost chap03]# cat 1
northwest
western
southwest
southern
southeast
eastern
northeast
north
central
[root@localhost chap03]# cat 3
24500
25000
89500
126000
22350
95600
34200
57000
68900
[root@localhost chap03]# paste 1 3
northwest 24500
western 25000
southwest 89500
southern 126000
southeast 22350
eastern 95600
northeast 34200
north 57000
central 68900
[root@localhost chap03]# paste 1 3 > 5
[root@localhost chap03]# sed -n l 5
northwest\t24500\r$
western\t25000\r$
southwest\t89500\r$
southern\t126000\r$
southeast \t22350\r$
eastern\t95600\r$
northeast \t34200\r$
north\t57000\r$
central\t68900\r$
[root@localhost chap03]# paste -s 1
northwest western southwest southern southeast easternnortheast north central
[root@localhost chap03]# ls | paste -d ':' -s
1:2:3:4:5:datafile:datebook:db
[root@localhost chap03]# ls
1 2 3 4 5 datafile datebook db

 



 

[root@localhost chap03]# ls | paste -d ' ' -s
1 2 3 4 5 datafile datebook db
[root@localhost chap03]# echo *
1 2 3 4 5 datafile datebook db

[root@localhost chap03]# date | tr ' ' '\11'
五             3月     30      09:38:58        CST     2007

 

相关阅读 更多 +
排行榜 更多 +
辰域智控app

辰域智控app

系统工具 下载
网医联盟app

网医联盟app

运动健身 下载
汇丰汇选App

汇丰汇选App

金融理财 下载