ChinaUnix.net
相关文章推荐:

sed 显示中间

nuh302:UPP1:/ora/admin#top -h -d 1 > a.txt nuh302:UPP1:/ora/admin#cat a.txt System: nuh302 Thu Jul 31 18:12:37 2014 Load averages: 0.48, 0.52, 0.42 267 processes: 234 sleeping, 33 running Cpu states: (avg) LOAD USER NICE SYS IDLE BLOCK SWAIT INTR SSYS 0.48 14.9% 7.9% 15.8% 61.4% 0.0% 0.0% 0.0% 0.0% Memory: 8490064K (4246936K) ...

by HSRLJYHCY - Shell - 2014-08-01 11:27:07 阅读(2018) 回复(9)

相关讨论

文件中若干内容如下: a b c d 若想删除其它任意一个从.. 的部分,如何用sed实现呢?

by kala_fly - Shell - 2010-08-02 14:19:01 阅读(3601) 回复(10)

问题1:最后一行是奇数行如何显示?[code][dut@ubuntu-desktop ~/sed]$cat -n boot.ini 1 [boot loader] 2 timeout=30 3 default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS 4 [operating systems] 5 multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Home Edition" /noexecute=optin /fastdetect[/code]运行命令[code][dut@ubuntu-desktop ~/sed]$sed -n -e 'N;P' boot.ini [boot...

by computerzanz - Shell - 2010-09-26 18:04:40 阅读(2837) 回复(6)

文件1.txt内容 WaveLength: 850nm, Transmission Distance: 550m Loopback:none, full-duplex mode, negotiation: disable, Pause Flowcontrol:Receive Enable and Send Enable Last physical up time : 2009-08-28 02:02:58 Last physical down time : 2009-08-28 01:52:13 GigabitEthernet3/0/5 current state : UP Line protocol current state : DOWN Description:To-N1G Route Port,The Maximum Transmit Unit is 1500 Inte...

by ipv6ok - Linux系统管理 - 2010-01-29 21:00:22 阅读(2505) 回复(8)

:arrow:这边高人多, 我把linuxforum上的一个问题转来了,看有没有人能回答, 在那边放了几天都没人回答,郁闷:(! ----------------------------------------------------------------------- :!:我想将ls -l列表的最后一列高亮显示, 如下代码为何不行呢。(我知道用ls -l --color可以实现,但我只是想知道这样为何不行) ----------------------------------------------------------------------- #!/bin/bash ABC=`ls -l | se...

by jruv - Shell - 2005-11-09 12:31:48 阅读(1506) 回复(7)

比如显示第5行,哪个方便

by btq - Shell - 2012-03-06 12:31:31 阅读(5199) 回复(5)

我现在有一篇英文文章,有些单词的末尾有单引号,我想将这个单引号除去,但是又要保留在单词中间的单引号。 打个比方: 有句话是 abc' def'gh sfsjd' sdfi'sdfi sfs 我想将其处理成: abc def'gh sfsjd sdfi'sdfi sfs 请问,我该如何使用sed呢?

by richard_world - Shell - 2013-07-06 18:04:01 阅读(1659) 回复(2)

本帖最后由 xwtnt236 于 2013-05-07 17:44 编辑 假如某文本内容为: 1.XXXXXXXX 2.XXXX 3.XXXX .... 6. 游戏 ...... 我想文本中位于第6行字符串中间的值“游戏”修改“应用”,用sed怎么去实现,救达人指教!多谢! 此题答案为:[code]sed -i '6{s/>.*应用

by xwtnt236 - Shell - 2013-05-07 17:38:44 阅读(1057) 回复(3)

1.txt中有内容: aaa bbbbb, cccc, eeee,eee ddddddddd 如果只有sed,去掉“,”结尾的行(中间不要留空白) 得到: aaa eeee,eee ddddddddd

by 磨即 - Shell - 2014-07-17 21:04:59 阅读(1533) 回复(7)

grep ,显示 匹配模式 行和上下几行 ? how to ? 谢谢些

by Unix1998 - Shell - 2011-10-28 04:36:32 阅读(2608) 回复(8)
by xxxxusky - Shell - 2007-01-15 16:28:02 阅读(1445) 回复(7)