Sponsored Content
Top Forums Shell Programming and Scripting overwrite specific lines in a file Post 302193686 by Franklin52 on Saturday 10th of May 2008 03:41:44 PM
Old 05-10-2008
Code:
 sed 's/^HorizSync.*/HorizSync 30.0 - 83.0/g' file

Regards
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How do you specific lines in a file?

I'm looking to show specific lines (eg. 20 through 40) of a series of files in the directory. How do I do this? (2 Replies)
Discussion started by: hedgehog001
2 Replies

2. Shell Programming and Scripting

remove specific lines from a file

Hi there I have a file with a variable amount of rows but the 45th, 46th and 47th charachter of each line is the status field which is a three digit code ie 001, 002, 003 etc. My question is this..I need to strip all the records/lines with 002's out of the file completely and put them into... (14 Replies)
Discussion started by: hcclnoodles
14 Replies

3. UNIX for Dummies Questions & Answers

how to display specific lines of a specific file

are there any basic commands that can display lines 99 - 101 of the /etc/passwd file? I'm thinking use of head and tail, but I forget what numbers to use and where to put /etc/passwd in the command. (2 Replies)
Discussion started by: raidkridley
2 Replies

4. UNIX Desktop Questions & Answers

shell overwrite lines in a file

Hello, I have an external file (file.txt). This shall be a kind of a config file for my shell script. I get the line numbers as to a corresponding entry by grep. Now I would like to substitute the corresponding line from the shell script back to the file and exactly on the same line number. ... (4 Replies)
Discussion started by: ACTGADE
4 Replies

5. Shell Programming and Scripting

Substitute specific lines with lines from another file

Hello All, I am new to this forum. I am currently facing a problem in manipulating files. I have two files called old-matter and new-matter # cat old-matter abc: this, is a, sample, entry byi: white board, is white in color rtz: black, board is black qty: i tried, a lot asd: no... (1 Reply)
Discussion started by: rahmathulla
1 Replies

6. Shell Programming and Scripting

Extracting specific lines of data from a file and related lines of data based on a grep value range?

Hi, I have one file, say file 1, that has data like below where 19900107 is the date, 19900107 12 144 129 0.7380047 19900108 12 168 129 0.3149017 19900109 12 192 129 3.2766666E-02 ... (3 Replies)
Discussion started by: Wynner
3 Replies

7. Shell Programming and Scripting

awk search/replace specific field, using variables for regexp & subsitution then overwrite file

Hello, I'm trying the solve the following problem. I have a file which I intend to use as a csv called master.csv The columns are separated by commas. I want to change the text on a specific row in either column 3,4,5 or 6 from xxx to yyy depending upon if column 1 matches a specified pattern.... (3 Replies)
Discussion started by: cyphex
3 Replies

8. UNIX for Dummies Questions & Answers

Quick UNIX command to display specific lines in the middle of a file from/to specific word

This could be a really dummy question. I have a log text file. What unix command to extract line from specific string to another specific string. Is it something similar to?: more +/"string" file_name Thanks (4 Replies)
Discussion started by: aku
4 Replies

9. UNIX for Dummies Questions & Answers

Add strings from one file at the end of specific lines in text file

Hello All, this is my first post so I don't know if I am doing this right. I would like to append entries from a series of strings (contained in a text file) consecutively at the end of specifically labeled lines in another file. As an example: - the file that contains the values to be... (3 Replies)
Discussion started by: gus74
3 Replies

10. Shell Programming and Scripting

Overwrite specific column in xml file with the specific column from adjacent line

I have an xml file dumped from rrd file, that I want to "patch" so the xml file doesn't contain any blank hole in the resulting graph of the rrd file. Here is the file. <!-- 2015-10-12 14:00:00 WIB / 1444633200 --> <row><v> 4.0419731265e+07 </v><v> 4.5045912770e+06... (2 Replies)
Discussion started by: rk4k
2 Replies
GLIDE(4)						     Kernel Interfaces Manual							  GLIDE(4)

NAME
glide - Glide video driver SYNOPSIS
Section "Device" Identifier "devname" Driver "glide" ... EndSection DESCRIPTION
glide is an Xorg driver for Glide capable video boards (such as 3Dfx Voodoo boards). This driver is mainly for Voodoo 1 and Voodoo 2 boards, later boards from 3Dfx have 2D built-in and you should preferably use a driver separate for those boards or the fbdev(4) driver. This driver is a bit special because Voodoo 1 and 2 boards are very much NOT made for running 2D graphics. Therefore, this driver uses no hardware acceleration (since there is no acceleration for 2D, only 3D). Instead it is implemented with the help of a "shadow" framebuffer that resides entirely in RAM. Selected portions of this shadow framebuffer are then copied out to the Voodoo board at the right time. Because of this, the speed of the driver is very dependent on the CPU. But since the CPU is nowadays actually rather fast at moving data, we get very good speed anyway, especially since the whole shadow framebuffer is in cached RAM. This driver supports 16 and 24 bit color modes. The 24 bit color mode uses a 32 bit framebuffer (it has no support for 24 bit packed-pixel framebuffers). Notice that the Voodoo boards can only display 16 bit color, but the shadow framebuffer can be run in 24 bit color. The point of supporting 24 bit mode is that this enables you to run in a multihead configuration with Xinerama together with another board that runs in real 24 bit color mode. (All boards must run the same color depth when you use Xinerama). Resolutions supported are: 640x480, 800x600, 960x720, 1024x768, 1280x1024 and 1600x1200. Note that not all modes will work on all Voodoo boards. It seems that Voodoo 2 boards support no higher than 1024x768 and Voodoo 1 boards can go to 800x600. If you see a message like this in the output from the server: (EE) GLIDE(0): grSstWinOpen returned ... Then you are probably trying to use a resolution that is supported by the driver but not supported by the hardware. Refresh rates supported are: 60Hz, 75Hz and 85Hz. The refresh rate used is derived from the normal mode line according to the following ta- ble: Mode-line refresh rate Used refresh rate 0-74 Hz 60 Hz 74-84 Hz 75 Hz 84- Hz 85 Hz Thus, if you use a modeline that for example has a 70Hz refresh rate you will only get a 60Hz refresh rate in actuality. Selecting which Voodoo board to use with the driver is done by using an option called "GlideDevice" in the "Device" section. (If you don't have this option present then the first board found will be selected for that Device section). For example: To use the first Voodoo board, use a "Device" section like this, for example: Section "Device" Identifier "Voodoo" Driver "glide" Option "dpms" "on" Option "GlideDevice" "0" EndSection And if you have more than one Voodoo board, add another "Device" section with a GlideDevice option with value 1, and so on. (You can use more than one Voodoo board, but SLI configured boards will be treated as a single board.) Multihead and Xinerama configurations are supported. Limited support for DPMS screen saving is available. The "standby" and "suspend" modes are just painting the screen black. The "off" mode turns the Voodoo board off and thus works correctly. This driver does not support a virtual screen size different from the display size. SUPPORTED HARDWARE
The glide driver supports any board that can be used with Glide (such as 3Dfx Voodoo boards) CONFIGURATION DETAILS
Please refer to xorg.conf(5) for general configuration details. This section only covers configuration details specific to this driver. The following driver Options are supported: Option "OnAtExit" "boolean" If true, will leave the Voodoo board on when the server exits. Useful in a multihead setup when only the Voodoo board is connected to a second monitor and you don't want that monitor to lose signal when you quit the server. Put this option in the Device section. Default: off. Option "GlideDevice" "integer" Selects which Voodoo board to use. (Or boards, in an SLI configuration). The value should be 0 for the first board, 1 for the sec- ond and so on. If it is not present, the first Voodoo board found will be selected. Put this option in the Device section. EXAMPLE
Here is an example of a part of an xorg.conf file that uses a multihead configuration with two monitors. The first monitor is driven by the fbdev video driver and the second monitor is driven by the glide driver. Section "Monitor" Identifier "Monitor 1" VendorName "Unknown" ModelName "Unknown" HorizSync 30-70 VertRefresh 50-80 # 1024x768 @ 76 Hz, 62.5 kHz hsync Modeline "1024x768" 85 1024 1032 1152 1360 768 784 787 823 EndSection Section "Monitor" Identifier "Monitor 2" VendorName "Unknown" ModelName "Unknown" HorizSync 30-70 VertRefresh 50-80 # 1024x768 @ 76 Hz, 62.5 kHz hsync Modeline "1024x768" 85 1024 1032 1152 1360 768 784 787 823 EndSection Section "Device" Identifier "fb" Driver "fbdev" Option "shadowfb" Option "dpms" "on" # My video card is on the AGP bus which is usually # located as PCI bus 1, device 0, function 0. BusID "PCI:1:0:0" EndSection Section "Device" # I have a Voodoo 2 board Identifier "Voodoo" Driver "glide" Option "dpms" "on" # The next line says I want to use the first board. Option "GlideDevice" "0" EndSection Section "Screen" Identifier "Screen 1" Device "fb" Monitor "Monitor 1" DefaultDepth 16 Subsection "Display" Depth 16 Modes "1024x768" EndSubSection EndSection Section "Screen" Identifier "Screen 2" Device "Voodoo" Monitor "Monitor 2" DefaultDepth 16 Subsection "Display" Depth 16 Modes "1024x768" EndSubSection EndSection Section "ServerLayout" Identifier "Main Layout" # Screen 1 is to the right and screen 2 is to the left Screen "Screen 2" Screen "Screen 1" "" "" "Screen 2" "" EndSection If you use this configuration file and start the server with the +xinerama command line option, the two monitors will be showing a single large area where windows can be moved between monitors and overlap from one monitor to the other. Starting the X server with the Xinerama extension can be done for example like this: $ xinit -- +xinerama FILES
glide_drv.o SEE ALSO
Xorg(1), xorg.conf(5), Xserver(1), X(7) AUTHORS
Author: Henrik Harmsen. X Version 11 xf86-video-glide 1.2.0 GLIDE(4)
All times are GMT -4. The time now is 05:51 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy