Sponsored Content
Top Forums Shell Programming and Scripting Filter duplicate block of text using SED Post 302249996 by ankimo on Wednesday 22nd of October 2008 01:38:39 PM
Old 10-22-2008
I'd like to piggy-back onto this post and ask, how do I read everything in between "start" and "end" so that "start" and "end" are not included in the extraction?

I recognize that I can use different words, but I want to keep "start" and "end" in my file. The reason is that I created a help page for a script I wrote. When option -h is used, it grabs the text from the file. It would be handy to have all my help pages begin with "start" and end with "end". But I don't want those words to display on the screen.

Thanks.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

using sed(?) to delete a block of text

hello people, i am trying to accomplish what i thought should be a simple task: find a token in a file and delete a number (let's say 25) of lines following the token. in sed, i can't figure out how to do a relative address (i.e. something like /token/25dd to delete 25 lines) and in gnu grep,... (3 Replies)
Discussion started by: toast
3 Replies

2. Shell Programming and Scripting

Filter/remove duplicate .dat file with certain criteria

I am a beginner in Unix. Though have been asked to write a script to filter(remove duplicates) data from a .dat file. File is very huge containig billions of records. contents of file looks like 30002157,40342424,OTC,mart_rec,100, ,0 30002157,40343369,OTC,mart_rec,95, ,0... (6 Replies)
Discussion started by: mukeshguliao
6 Replies

3. Shell Programming and Scripting

Filter or remove duplicate block of text without distinguishing marks or fields

Hello, Although I have found similar questions, I could not find advice that could help with our problem. The issue: We have several hundreds text files containing repeated blocks of text (I guess back at the time they were prepared like that to optmize printing). The block of texts... (13 Replies)
Discussion started by: samask
13 Replies

4. Shell Programming and Scripting

using sed/awk to replace a block of text in a file?

My apologies if this has been answered in a previous post. I've been doing a lot of searching, but I haven't been able to find what I was looking for. Specifically, I am wondering if I can utilize sed and/or awk to locate two strings in a file, and replace everything between those two strings... (12 Replies)
Discussion started by: kiddsupreme
12 Replies

5. Shell Programming and Scripting

Delete first block of text with sed/awk

Hello, guys! "filename" has blocks with three lines each in this fashion: 93909286 #verified has one bug 10909286 #unverified pending 10909286 #unverified pendingThe above example has duplicate blocks, and I have tried using sed to remove just one block... The... (2 Replies)
Discussion started by: teresaejunior
2 Replies

6. Shell Programming and Scripting

Block of text replacement using sed

Hi, I have a requirement in which i need to replace text as below - <stringProp name="Recipe">&lt;AddGroup Name=&quot;1001&quot; Path=&quot;ServiceAdministration/Controls/1001/ServiceSwitches&quot;&gt; &lt;Param Name=&quot;AttributeName&quot; Value=&quot;HeaderManipRspIngressRuleSet&quot; Type=&quot;String&quot; /&gt; &lt;Param Name=&quot;Value&quot;... (0 Replies)
Discussion started by: abhitanshu
0 Replies

7. UNIX for Dummies Questions & Answers

Filter records in a huge text file from a filter text file

Hi Folks, I have a text file with lots of rows with duplicates in the first column, i want to filter out records based on filter columns in a different filter text file. bash scripting is what i need. Data.txt Name OrderID Quantity Sam 123 300 Jay 342 498 Kev 78 2500 Sam 420 50 Vic 10... (3 Replies)
Discussion started by: tech_frk
3 Replies

8. Shell Programming and Scripting

Filter file to remove duplicate values in first column

Hello, I have a script that is generating a tab delimited output file. num Name PCA_A1 PCA_A2 PCA_A3 0 compound_00 -3.5054 -1.1207 -2.4372 1 compound_01 -2.2641 0.4287 -1.6120 3 compound_03 -1.3053 1.8495 ... (3 Replies)
Discussion started by: LMHmedchem
3 Replies

9. Shell Programming and Scripting

Filter duplicate records from csv file with condition on one column

I have csv file with 30, 40 columns Pasting just three column for problem description I want to filter record if column 1 matches CN or DN then, check for values in column 2 if column contain 1235, 1235 then in column 3 values must be sequence of 2345, 2345 and if column 2 contains 6789, 6789... (5 Replies)
Discussion started by: as7951
5 Replies

10. Shell Programming and Scripting

CSV File:Filter duplicate records from column1 & another column having unique record

Hi Experts, I have csv file with 30, 40 columns Pasting just 2 column for problem description. Need to print error if below combination is not present in file check for column-1 (DocumentNumber) and filter columns where value in DocumentNumber field is same. For all such rows, the field... (7 Replies)
Discussion started by: as7951
7 Replies
DMX(3X) 																   DMX(3X)

NAME
DMX - X Window System DMX (Distributed Multihead X) extension DESCRIPTION
The DMX extension provides support for communication with and control of Xdmx(1) server. Attributes of the Xdmx(1) server and of the back- end screens attached to the server can be queried and modified via this protocol. SUMMARY OF LIBRARY FUNCTIONS
The following is a summary of DMX library functions: DMXQueryExtension(3X) - determine if DMX is available DMXQueryVersion(3X) - determine DMX extension version DMXSync(3X) - flush protocol requests between Xdmx(1) and back-end X servers DMXForceWindowCreation(3X) - force immediate back-end window creation DMXGetScreenCount(3X) - determine number of back-end screens DMXGetScreenAttributes(3X) - determine back-end screen attributes DMXChangeScreensAttributes(3X) - change back-end screen attributes DMXAddScreen(3X) - attach a new back-end screen DMXRemoveScreen(3X) - detach a back-end screen DMXGetWindowAttributes(3X) - determine back-end window attributes DMXGetDesktopAttributes(3X) - determine global bounding box DMXChangeDesktopAttributes(3X) - change global bounding box DMXGetInputCount(3X) - determine number of input devices DMXGetInputAttributes(3X) - determine input device attributes DMXAddInput(3X) - attach a new backend or console input DMXRemoveInput(3X) - detach an input DMXAddBackendInput(3X) - attach a new back-end input DMXAddConsoleInput(3X) - attach a new console input Each of these functions is described in its own man page. SEE ALSO
Xdmx(1), xdmxconfig(1), vdltodmx(1) XFree86 Version 4.7.0 DMX(3X)
All times are GMT -4. The time now is 07:30 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy