Sponsored Content
Top Forums UNIX for Advanced & Expert Users How to identify particular section using sed? Post 302892220 by ahamed101 on Tuesday 11th of March 2014 02:04:15 PM
Old 03-11-2014
This is based on the pattern in the input file

Code:
sed '/^T/{s/\([0-9]\)        \([A-Z]\)/\120140331\2/}' infile

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

sed & awk--get section of file based 2 params

I need to get a section of a file based on 2 params. I want the part of the file between param 1 & 2. I have tried a bunch of ways and just can't seem to get it right. Can someone please help me out.....its much appreciated. Here is what I have found that looks like what I want....but doesn't... (12 Replies)
Discussion started by: Andy Cook
12 Replies

2. Shell Programming and Scripting

Using Sed to duplicate a section of a file....

hello all, I have a file like this: section 1 blah1 blah2 section 2 blah1 blah2 section 3 blah1 blah2 and I want to use sed to duplicate section 2, like this: section 1 blah1 blah2 section 2 blah1 blah2 section 2 blah1 (2 Replies)
Discussion started by: nick26
2 Replies

3. Shell Programming and Scripting

Sed : identify a pattern and append a word at the end of a line

Hello to all, On aix, I want to identify a term on a line in a file and then add a word at the end of the line identified. I do not want the word to be added when the line contains the symbol "#". I use the following command, but it deletes the term identified then adds the word. #sed... (4 Replies)
Discussion started by: dantares
4 Replies

4. Shell Programming and Scripting

Extract section of file based on word in section

I have a list of Servers in no particular order as follows: virtualMachines="IIBSBS IIBVICDMS01 IIBVICMA01"And I am generating some output from a pre-existing script that gives me the following (this is a sample output selection). 9/17/2010 8:00:05 PM: Normal backup using VDRBACKUPS... (2 Replies)
Discussion started by: jelloir
2 Replies

5. Shell Programming and Scripting

Help identify string using sed

I have the following output and would like to only identify strings with "vw" at the end. Here is the file contents: SELECT n.contract_num, n.descr, s.prj_level2_cf_val, r.descr, r.project_id, p.offering_id, o.n_cust_contract, u.name1, ' ', ' ', SUM (0), TO_CHAR (t.start_dt, 'YYYY-MM-DD'),... (6 Replies)
Discussion started by: bobroberts369
6 Replies

6. Shell Programming and Scripting

Prepend first line of section to each line until the next section header

I have searched in a variety of ways in a variety of places but have come up empty. I would like to prepend a portion of a section header to each following line until the next section header. I have been using sed for most things up until now but I'd go for a solution in just about anything--... (7 Replies)
Discussion started by: pagrus
7 Replies

7. Shell Programming and Scripting

sed - String substitution within specified section in ini type file

Hello. I am trying to modify a config file which is in windows *.ini type file. I have found a piece of code here :linux - Edit file in unix using SED - Stack Overflow As I can't make it doing the job , I am trying to find a solution step by step. here a modified sample file : my_sample.ini... (1 Reply)
Discussion started by: jcdole
1 Replies

8. Shell Programming and Scripting

Section Removal With sed; and With a Twist . . .

Hello folks! Raised a bump on my head trying to figure this one out ;) I have an xml file which needs to be edited, removing an entire property section in the work. Here's what the target section layout looks like: <property name="something"> {any number of lines go here} </property>... (7 Replies)
Discussion started by: LinQ
7 Replies

9. Shell Programming and Scripting

How to identify exact text and then add a blank line above it using sed?

I need to identify the exact text of San Antonio Generator Running in the output my script which lands to a text file. Once SED finds the specific text, I need it to insert one line above the matched text. Here is what I have so far that isn't working all that well for me. Any help would be... (7 Replies)
Discussion started by: jbrass
7 Replies

10. UNIX for Beginners Questions & Answers

How to identify delimiter to find and replace a string with sed?

I need to find and replace a date format in a SQL script with sed. The original lines are like this: ep.begin_date, ep.end_date, ep.facility_code, AND ep.begin_date <= '01-JUL-2019' ep.begin_date, ep.end_date, ep.facility_code, AND ... (15 Replies)
Discussion started by: duke0001
15 Replies
GLCOPYCOLORSUBTABLE(3G) 												   GLCOPYCOLORSUBTABLE(3G)

NAME
glCopyColorSubTable - respecify a portion of a color table C SPECIFICATION
void glCopyColorSubTable( GLenum target, GLsizei start, GLint x, GLint y, GLsizei width ) PARAMETERS
target Must be one of GL_COLOR_TABLE, GL_POST_CONVOLUTION_COLOR_TABLE, or GL_POST_COLOR_MATRIX_COLOR_TABLE. start The starting index of the portion of the color table to be replaced. x, y The window coordinates of the left corner of the row of pixels to be copied. width The number of table entries to replace. DESCRIPTION
glCopyColorSubTable is used to respecify a contiguous portion of a color table previously defined using glColorTable. The pixels copied from the framebuffer replace the portion of the existing table from indices start to start + x - 1, inclusive. This region may not include any entries outside the range of the color table, as was originally specified. It is not an error to specify a subtexture with width of 0, but such a specification has no effect. NOTES
glCopyColorSubTable is present only if GL_ARB_imaging is returned when glGetString is called with an argument of GL_EXTENSIONS. ERRORS
GL_INVALID_VALUE is generated if target is not a previously defined color table. GL_INVALID_VALUE is generated if target is not one of the allowable values. GL_INVALID_VALUE is generated if start + x > width. GL_INVALID_OPERATION is generated if glCopyColorSubTable is executed between the execution of glBegin and the corresponding execution of glEnd. ASSOCIATED GETS
glGetColorTable, glGetColorTableParameter SEE ALSO
glColorSubTable, glColorTableParameter, glCopyColorTable, glCopyColorSubTable, glGetColorTable GLCOPYCOLORSUBTABLE(3G)
All times are GMT -4. The time now is 09:24 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy