|

楼主 |
发表于 2008-10-19 20:42:46
|
显示全部楼层
找到方法了, 用sed -e, 呵呵
[linuxsir@linuxsir bin]$ cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
[linuxsir@linuxsir bin]$ cat /etc/hosts | sed -e'1ihello world!'
hello world!
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost |
|