Sponsored Content
Top Forums UNIX for Dummies Questions & Answers exclude columns with a matching line pattern Post 302209940 by greptastic on Sunday 29th of June 2008 11:07:43 AM
Old 06-29-2008
Still need more help....

I think I should explain a little more...
I want to exclude cases where there is information in all three columns (ie. BBB_0123 BVG_0895 BSD_0987 straight across) and only keep lines that have gaps :
Thanks so much for your help!

BBB_0123 BVG_0895 BSD_0987
BBB_0123 BVG_0895 BSD_0987
BBB_0123 BSD_0987
BBB_0123 BVG_0895
BVG_0895
BBB_0123 BVG_0895 BSD_0987
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

comment/delete a particular pattern starting from second line of the matching pattern

Hi, I have file 1.txt with following entries as shown: 0152364|134444|10.20.30.40|015236433 0233654|122555|10.20.30.50|023365433 ** ** ** In file 2.txt I have the following entries as shown: 0152364|134444|10.20.30.40|015236433 0233654|122555|10.20.30.50|023365433... (4 Replies)
Discussion started by: imas
4 Replies

2. Shell Programming and Scripting

using command line arguments as columns for pattern matching using awk

Hi, I wish to use a column, as inputted by a user from command line, for pattern matching. awk file: { if($1 ~ /^8/) { print $0> "temp2.csv" } } something like this, but i want '$1' to be any column as selected by the user from command line. ... (1 Reply)
Discussion started by: invinclible0009
1 Replies

3. Shell Programming and Scripting

How to use sed to modify a line above or below matching pattern?

I couldn't figure out how to use sed or any other shell to do the following. Can anyone help? Thanks. If seeing a string (e.g., TODAY) in the line, replace a string in the line above (e.g, replace "Raining" with "Sunny") and replace a string in the line below (e.g., replace "Reading" with... (7 Replies)
Discussion started by: sprinner
7 Replies

4. Shell Programming and Scripting

matching pattern to end of line

I have the following code and want to get only the comments. Ideally I would like to replace the characters to the left of the first '!' in the line with blanks. real, dimension(:), allocatable :: ft ! stores a single trace real, dimension(:), allocatable :: tr ! stores a single... (8 Replies)
Discussion started by: kristinu
8 Replies

5. Shell Programming and Scripting

Duplicate line removal matching some columns only

I'm looking to remove duplicate rows from a CSV file with a twist. The first row is a header. There are 31 columns. I want to remove duplicates when the first 29 rows are identical ignoring row 30 and 31 BUT the duplicate that is kept should have the shortest total character length in rows 30... (6 Replies)
Discussion started by: Michael Stora
6 Replies

6. Shell Programming and Scripting

awk to copy previous line matching a particular columns

Hello Help, 2356798 7689867 999 000 123678 20385907 9797 666 17978975 87468976 968978 98798 I am trying to have out put which actually look for the third column value of 9797 and then it insert line there after with first, second column value exactly as the previous line and replace the third... (3 Replies)
Discussion started by: Indra2011
3 Replies

7. Shell Programming and Scripting

Sed: printing lines AFTER pattern matching EXCLUDING the line containing the pattern

'Hi I'm using the following code to extract the lines(and redirect them to a txt file) after the pattern match. But the output is inclusive of the line with pattern match. Which option is to be used to exclude the line containing the pattern? sed -n '/Conn.*User/,$p' > consumers.txt (11 Replies)
Discussion started by: essem
11 Replies

8. Shell Programming and Scripting

Fetching a line matching a pattern

Hi Gurus, I have a file as follows (Sample shown below but the list is very huge) SCHEDULE WS1#JS1 RUNCYCLE1 : WS1#JOB1 WS1#JOB2 FOLLOWS JOB1 END SCHEDULE WS2#JS1 RUNCYCLE2 : WS1#JOB3 WS1#JOB1 FOLLOWS JOB3 WS2#JOB1 (10 Replies)
Discussion started by: jayadanabalan
10 Replies

9. UNIX for Dummies Questions & Answers

Print only the duplicate line only with matching columns

Hi There, I have an I/P which looks like -- 1 2 3 4 5 1 2 3 4 6 4 7 8 9 9 5 6 7 8 9 I would like O/P to be --- 1 2 3 4 5 1 2 3 4 6 So, printing only the consecutive lines where $1,$2,$3,$4 are matching. Is there any command to do this or small awk script? Thanks, (12 Replies)
Discussion started by: Indra2011
12 Replies

10. Shell Programming and Scripting

How do I select certain columns with matching pattern and rest of the lines?

I want to select 2nd, 3rd columns if line has "key3" and print rest of the lines as is. # This is my sample input key1="val1" key2="val2" key3="val3" key4="val4" some text some text some text some text key1="val1" key2="val2" key3="val3" key4="val4" some text some text some text some... (3 Replies)
Discussion started by: kchinnam
3 Replies
cuebreakpoints(1)					      General Commands Manual						 cuebreakpoints(1)

NAME
cuebreakpoints - report track breakpoints from a CUE or TOC file SYNOPSIS
cuebreakpoints [ { -i format | --input-format=format } { --append-gaps | --prepend-gaps | --split-gaps } ] [ file ... ] cuebreakpoints --help DESCRIPTION
cuebreakpoints reports the track breakpoints found in CUE and TOC files, which are typically created by compact disc ripping software. The breakpoints are in a format usable by shnsplit (part of the shntool package). Three approaches to track pregaps are availabe: append (to previous track), prepend (to succeeding track), and split (from both preceding and succeeding tracks). The split approach can result in up to twice as many breakpoints being reported as there are tracks on the disc. The first track's pregap cannot be appended to the previous track, so it is prefixed to the track in both append and prepend modes. If you want the track without it, use the --split-gaps option. If no filenames are specified, cuebreakpoints reads from standard input, and an input format option must be specified. If one or more filenames is provided, but the input format option is not specified, the input format will be guessed based on each file's suffix (e.g., .cue or .toc). This heuristic is case-insensitive. OPTIONS
-h, --help displays a usage message and exits. -i format, --input-format=format sets the expected format of the input file(s) to format, which must be either cue or toc. --append-gaps appends pregaps to the end of the previous track. This is the default. --prepend-gaps prefixes pregaps to the beginning of each subsequent track. --split-gaps separates pregaps from both the preceding and succeeding tracks. If more than one of --append-gaps, --prepend-gaps, and --split-gaps are specified, all except the last encountered are ignored. EXIT STATUS
cuebreakpoints exits with status zero if it successfully generates a report for each input file, and nonzero if there were problems. AUTHOR
Cuetools was written by Svend Sorensen. Branden Robinson contributed fixes and enhancements to the utilities and documentation. SEE ALSO
cueconvert(1), cueprint(1) cuebreakpoints(1)
All times are GMT -4. The time now is 07:29 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy