当前位置: 技术问答>linux和unix
linux下.sh修改文件
来源: 互联网 发布时间:2016-09-21
本文导语: 如题: 文件路径:/etc/X11/xorg.conf 文件内容: # nvidia-settings: X configuration file generated by nvidia-settings # nvidia-settings: version 1.0 (mockbuild@builder.wilsonet.com) Wed Apr 28 18:27:01 EDT 2010 # nvidia-xconfig: X configuration ...
如题:
文件路径:/etc/X11/xorg.conf
文件内容:
# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings: version 1.0 (mockbuild@builder.wilsonet.com) Wed Apr 28 18:27:01 EDT 2010
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig: version 1.0 (mockbuild@) Sun Feb 28 14:49:02 EST 2010
### Touch Configuration Beginning ###
### Touch Configuration End ###
Section "ServerLayout"
InputDevice "EETI" "SendCoreEvents"
Identifier "Layout0"
Screen 0 "Screen0" 0 0
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
Option "Xinerama" "0"
EndSection
Section "Files"
FontPath "/usr/share/fonts/default/Type1"
EndSection
Section "InputDevice"
# generated from default
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/input/mice"
Option "Emulate3Buttons" "no"
Option "ZAxisMapping" "4 5"
EndSection
Section "InputDevice"
# generated from data in "/etc/sysconfig/keyboard"
Identifier "Keyboard0"
Driver "kbd"
Option "XkbLayout" "us"
Option "XkbModel" "pc105"
EndSection
Section "InputDevice"
Identifier "EETI"
Driver "egalax"
Option "Device" "/dev/ttyS2"
Option "Parameters" "/var/lib/eeti.param"
Option "ScreenNo" "0"
EndSection
Section "Monitor"
Identifier "Monitor0"
VendorName "Unknown"
ModelName "Envision EFT7x0 Series"
HorizSync 30.0 - 72.0
VertRefresh 50.0 - 160.0
Option "DPMS"
EndSection
Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BoardName "ION"
Option "Nologo" "TRUE"
EndSection
Section "Screen"
# Removed Option "metamodes" "CRT: nvidia-auto-select +0+0, DFP: nvidia-auto-select +1024+0"
# Removed Option "metamodes" "CRT: nvidia-auto-select +0+0, DFP: 1024x768 +1024+0"
# Removed Option "metamodes" "CRT: nvidia-auto-select +0+0, DFP: 1280x720 +1024+0"
# Removed Option "metamodes" "CRT: nvidia-auto-select +0+0, DFP: NULL"
Identifier "Screen0"
Device "Device0"
Monitor "Monitor0"
DefaultDepth 24
Option "TwinView" "1"
Option "TwinViewXineramaInfoOrder" "CRT-0"
Option "metamodes" "CRT: 1024x768 +0+0, DFP: 1024x768 +1024+0" //修改这行。
SubSection "Display"
Depth 24
EndSubSection
EndSection
|
原来的内容是什么 修改成什么?
使用sed 先匹配 再替换
使用sed 先匹配 再替换