請問如何用sed作指定行插入指定內容 - BBS

Table of Contents

找各大說明來照著作..但做不出來...

要做的是編輯 /etc/X11/xorg.conf,
在 FontPath 區段最前面加入 TrueType 及 local 二個路徑
如下
Section "Files"
RgbPath "/usr/X11R6/lib/X11/rgb"
ModulePath "/usr/X11R6/lib/modules"
+ FontPath "/usr/X11R6/lib/X11/fonts/TrueType/"
+ FontPath "/usr/X11R6/lib/X11/fonts/local/"
...

請問可能用sed做出來嗎?

--

All Comments