首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 操作系统 > UNIXLINUX >

linux 在资料开头添加内容

2012-12-27 
linux 在文件开头添加内容1、利用ed命令例如:(echo 0a echo This is the beginning. echo . echo

linux 在文件开头添加内容

1、利用ed命令

例如:

(echo '0a'; echo 'This is the beginning.'; echo '.'; echo 'wq') | ed -s file

?

2、利用sed命令

?

sed -i '1i\This is the beginning' file

热点排行