12-01-2006
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 give me back the right stuff.
sed -n '/[$PARAM1]/,/[$PARAM2]/p'
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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
2. Shell Programming and Scripting
Hi,
I have a file formated like this:
John 7.22 2010-01-25_17:01:36
George 8.22 2010-01-25_17:02:36
Bob 9.62 2010-01-25_17:04:36
Jane 10.11 2010-01-25_17:05:36
Emma 4.52 2010-01-25_17:01:36
What I want to do is cut out only the entries that have... (2 Replies)
Discussion started by: Donkey25
2 Replies
3. Shell Programming and Scripting
I have large number of data files, close to 300 files, lets say all files are same kind and have extension .dat , each file have mulitple lines in it.
There is a unique line in each file containing string 'SERVER'. Right after this line there is another line which contain a string 'DIGIT=0',... (4 Replies)
Discussion started by: sal_tx
4 Replies
4. Shell Programming and Scripting
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
Greetings,
I recently built a replicated DRBD, Heartbeat, & iSCSI Target Initiator storage server on Ubuntu 10.04 to offer shared storage to server Vmware ESX and Microsoft Clusters. Everything works flawlessly, however I wanted to make a script to create, remove, grow volumes to offer ESX... (6 Replies)
Discussion started by: Aeudian
6 Replies
6. Shell Programming and Scripting
Hi Everyone,
I need some help to accomplish the below. help is highly appriciated.
I have a 45 mb file with ldap entries. Each user entry is separated by a string # entry-id: 1 and so on. Some of the entries has a string xyz: true. I want to delete the section if the user section has xyz: true... (6 Replies)
Discussion started by: Samingla
6 Replies
7. Shell Programming and Scripting
Hi All, Need Suggestion, Want to sort a file using awk & sed to get required, output as below, such that each LUN shows correct WWPN and FA port Numbers correctly:
Required output:
01FB 10000000c97843a2 8C 0
01FB 10000000c96fb279 9C 0
22AF 10000000c97843a2 8C 0
22AF 10000000c975adbd ... (10 Replies)
Discussion started by: aix_admin_007
10 Replies
8. Shell Programming and Scripting
input file
output file (1 Reply)
Discussion started by: lathigara
1 Replies
9. Shell Programming and Scripting
Hi Guru's,
I am new to unix scripting. I have a huge file with user details in it(file2) and I have another file with a list of users(file1). Script has to search a user from file1 and get all the associated lines from file2.
Example:
fiel1:
cn=abc
cn=DEF
cn=xyx
File 2:
dn:... (10 Replies)
Discussion started by: Samingla
10 Replies
10. Shell Programming and Scripting
I have two files which are the output of a multiple choice vocab test (60 separate questions) from 104 people (there are some missing responses) and the question list. I have the item list in one file (File1)
Item,Stimulus,Choice1,Choice2,Choice3,Choice4,Correct... (5 Replies)
Discussion started by: samonl
5 Replies
LEARN ABOUT OSX
glpointparameter
GLPOINTPARAMETER(3G) OpenGL 3.3 GLPOINTPARAMETER(3G)
NAME
glPointParameter - specify point parameters
C SPECIFICATION
void glPointParameterf(GLenum pname, GLfloat param);
void glPointParameteri(GLenum pname, GLint param);
PARAMETERS
pname
Specifies a single-valued point parameter. GL_POINT_FADE_THRESHOLD_SIZE, and GL_POINT_SPRITE_COORD_ORIGIN are accepted.
param
Specifies the value that pname will be set to.
C SPECIFICATION
void glPointParameterfv(GLenum pname, const GLfloat * params);
void glPointParameteriv(GLenum pname, const GLint * params);
PARAMETERS
pname
Specifies a point parameter. GL_POINT_FADE_THRESHOLD_SIZE, and GL_POINT_SPRITE_COORD_ORIGIN are accepted.
params
Specifies the value to be assigned to pname..
DESCRIPTION
The following values are accepted for pname:
GL_POINT_FADE_THRESHOLD_SIZE
params is a single floating-point value that specifies the threshold value to which point sizes are clamped if they exceed the
specified value. The default value is 1.0.
GL_POINT_SPRITE_COORD_ORIGIN
params is a single enum specifying the point sprite texture coordinate origin, either GL_LOWER_LEFT or GL_UPPER_LEFT. The default value
is GL_UPPER_LEFT.
ERRORS
GL_INVALID_VALUE is generated if the value specified for GL_POINT_FADE_THRESHOLD_SIZE is less than zero.
GL_INVALID_ENUM is generated If the value specified for GL_POINT_SPRITE_COORD_ORIGIN is not GL_LOWER_LEFT or GL_UPPER_LEFT.
ASSOCIATED GETS
glGet() with argument GL_POINT_FADE_THRESHOLD_SIZE
glGet() with argument GL_POINT_SPRITE_COORD_ORIGIN
SEE ALSO
glPointSize()
COPYRIGHT
Copyright (C) 1991-2006 Silicon Graphics, Inc. Copyright (C) 2010 Khronos Group. This document is licensed under the SGI Free Software B
License. For details, see http://oss.sgi.com/projects/FreeB/.
OpenGL 3.3 03/08/2011 GLPOINTPARAMETER(3G)