Sponsored Content
Top Forums Shell Programming and Scripting Parse and delete lines efficiently Post 302345682 by edidataguy on Thursday 20th of August 2009 01:56:36 AM
Old 08-20-2009
Always, give the input and the expected output and the condition.
It will be easier if you give the ouput.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

parse files and delete

For the CSV file it should have one entry per line looking like this: pwd/filename,YYYYMMDDhhmmss,OK The date stamp should be from the file properties and OK will be a constant. find . name 'W*' gives me the proper list of files and date +%Y%m%d%H%M%S is the proper date format but I... (0 Replies)
Discussion started by: pimentelgg
0 Replies

2. Shell Programming and Scripting

How to parse a string efficiently

I am new to the boards and to shell programming and have a requirement to name new files received with a unique sequence number. I need to look at a particular file pattern that exists and then to increment a sequence by 1 and write the new file. Example of file names and sequence # ... (4 Replies)
Discussion started by: sandiego_coder
4 Replies

3. Shell Programming and Scripting

How to delete lines in a file that have duplicates or derive the lines that aper once

Input: a b b c d d I need: a c I know how to get this (the lines that have duplicates) : b d sort file | uniq -d But i need opossite of this. I have searched the forum and other places as well, but have found solution for everything except this variant of the problem. (3 Replies)
Discussion started by: necroman08
3 Replies

4. UNIX for Dummies Questions & Answers

How get only required lines & delete the rest of the lines in file

Hiiii I have a file which contains huge data as a.dat: PDE 1990 1 9 18 51 28.90 24.7500 95.2800 118.0 6.1 0.0 BURMA event name: 010990D time shift: 7.3000 half duration: 5.0000 latitude: 24.4200 longitude: 94.9500 depth: 129.6000 Mrr: ... (7 Replies)
Discussion started by: reva
7 Replies

5. Shell Programming and Scripting

Parse a File ColumnWise & Delete the Rows

Hi , I have a CSV file that has around 50K records in it. I have to delete all the duplicate rows from the file except one, depending upon data in column4. Lets say there are 3 rows for 'column4data' in the file. I have to retain only that line which has the smallest date value in column2.... (3 Replies)
Discussion started by: Sheel
3 Replies

6. UNIX for Advanced & Expert Users

In a huge file, Delete duplicate lines leaving unique lines

Hi All, I have a very huge file (4GB) which has duplicate lines. I want to delete duplicate lines leaving unique lines. Sort, uniq, awk '!x++' are not working as its running out of buffer space. I dont know if this works : I want to read each line of the File in a For Loop, and want to... (16 Replies)
Discussion started by: krishnix
16 Replies

7. Shell Programming and Scripting

search and replace, when found, delete multiple lines, add new set of lines?

hey guys, I tried searching but most 'search and replace' questions are related to one liners. Say I have a file to be replaced that has the following: $ cat testing.txt TESTING AAA BBB CCC DDD EEE FFF GGG HHH ENDTESTING This is the input file: (3 Replies)
Discussion started by: DeuceLee
3 Replies

8. Shell Programming and Scripting

Sed/awk to delete single lines that aren't touching other lines

Hello, I'm trying to figure out how to use sed or awk to delete single lines in a file. By single, I mean lines that are not touching any other lines (just one line with white space above and below). Example: one two three four five six seven eight I want it to look like: (6 Replies)
Discussion started by: slimjbe
6 Replies

9. Shell Programming and Scripting

parse lines

I have file which is having 500 lines. I want to get the first 100 lines then sleep, then again next 100 lines sleep so now till the end of the file. Can someone tell me in perl and bash. also i want to do it in threads. Thanks.. (6 Replies)
Discussion started by: Anjan1
6 Replies

10. Shell Programming and Scripting

Parse tab delimited file, check condition and delete row

I am fairly new to programming and trying to resolve this problem. I have the file like this. CHROM POS REF ALT 10_sample.bam 11_sample.bam 12_sample.bam 13_sample.bam 14_sample.bam 15_sample.bam 16_sample.bam tg93 77 T C T T T T T tg93 79 ... (4 Replies)
Discussion started by: empyrean
4 Replies
plot(4B)					   SunOS/BSD Compatibility Package File Formats 					  plot(4B)

NAME
plot - graphics interface DESCRIPTION
Files of this format are interpreted for various devices by commands described in plot(1B). A graphics file is a stream of plotting instructions. Each instruction consists of an ASCII letter usually followed by bytes of binary information. The instructions are executed in order. A point is designated by four bytes representing the x and y values; each value is a signed integer. The last designated point in an l, m, n, or p instruction becomes the ``current point'' for the next instruction. m Move: the next four bytes give a new current point. n Cont: draw a line from the current point to the point given by the next four bytes. See plot(1B). p Point: plot the point given by the next four bytes. l Line: draw a line from the point given by the next four bytes to the point given by the following four bytes. t Label: place the following ASCII string so that its first character falls on the current point. The string is terminated by a NEW- LINE. a Arc: the first four bytes give the center, the next four give the starting point, and the last four give the end point of a circular arc. The least significant coordinate of the end point is used only to determine the quadrant. The arc is drawn counter-clockwise. c Circle: the first four bytes give the center of the circle, the next two the radius. e Erase: start another frame of output. f Linemod: take the following string, up to a NEWLINE, as the style for drawing further lines. The styles are ``dotted,'' ``solid,'' ``longdashed,'' ``shortdashed,'' and ``dotdashed.'' Effective only in plot 4014 and plot ver. s Space: the next four bytes give the lower left corner of the plotting area; the following four give the upper right corner. The plot will be magnified or reduced to fit the device as closely as possible. Space settings that exactly fill the plotting area with unity scaling appear below for devices supported by the filters of plot(1B). The upper limit is just outside the plotting area. In every case the plotting area is taken to be square; points outside may be displayable on devices whose face is not square. 4014 space(0, 0, 3120, 3120); ver space(0, 0, 2048, 2048); 300, 300s space(0, 0, 4096, 4096); 450 space(0, 0, 4096, 4096); SEE ALSO
graph(1), plot(1B) SunOS 5.11 18 Feb 2003 plot(4B)
All times are GMT -4. The time now is 04:11 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy