Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Search and delete a row which is delimited by |^ Post 303043378 by RavinderSingh13 on Monday 27th of January 2020 04:09:11 AM
Old 01-27-2020
Hello Tuxidow,

Could you please try following.

Code:
awk -F'\\|\\^' '$3==""{next} $4'  Input_file

NOTE: After seeing Rudi sir's comment edited this solution now.

Thanks,
R. Singh

Last edited by RavinderSingh13; 01-27-2020 at 05:32 AM..
This User Gave Thanks to RavinderSingh13 For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Delete last value from pipe delimited file

I have a large(ish) pipe delimited file. The last line of the file contains a total row count and a checksum: END|1537451|1328569446 After making other adjustments to the file, I need to strip out the checksum and apply a new value - I have a script to generate the checksum and 'cat' it... (3 Replies)
Discussion started by: relentl3ss
3 Replies

2. UNIX for Dummies Questions & Answers

How do you delete cells from a space delimited text file given row and column number?

How do you delete cells from a space delimited text file given row and column number? Letś say the row number is r and the column number is c. Thanks! (5 Replies)
Discussion started by: evelibertine
5 Replies

3. UNIX for Dummies Questions & Answers

Delete header row and reformat from tab delimited to fixed width

Hello gurus, I have a file in a tab delimited format and a header row. I need a code to delete the header in the file, and convert the file to a fixed width format, with all the columns aligned. Below is a sample of the file:... (4 Replies)
Discussion started by: chumsky
4 Replies

4. Shell Programming and Scripting

search column and delete row if greater than value

Hi, as the title states i need to find a way to search a column for values great than 1000, and if it is, then delete that row. An example 1 7.021 6.967 116.019 4 U 6.980E+07 0.000E+00 e 0 0 0 0 2 8.292 7.908 118.063 3 U 1.440E+07 0.000E+00 e 0 821 814 ... (3 Replies)
Discussion started by: olifu02
3 Replies

5. Shell Programming and Scripting

Comma delimited row into multiple rows, repeat first value

i am building a database to keep track of unix groups. Using the command "ypcat group" I get an output similar to the following group1:GROUP:9999:user1,user2,user3 groupA:GROUP:1111:usera,userb,userc I want to convert this output so it looks like this group1:user1 group1:user2... (2 Replies)
Discussion started by: newreverie
2 Replies

6. Shell Programming and Scripting

Converting a list to a row delimited

Hello, I have a large database with the following structure: set of clustered names followed by a hard return and followed by a second set of clustered names and so on. Sometimes the clusters can be as many as 150. Since the data is in an Indian language, a theoretical example will make this... (9 Replies)
Discussion started by: gimley
9 Replies

7. 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

8. Shell Programming and Scripting

awk read one delimited file, search another delimited file

Hello folks, I have another doozy. I have two files. The first file has four fields in it. These four fields map to different locations in my second file. What I want to do is read the master file (file 2 - 23 fields) and compare each line against each record in file 1. If I get a match in all four... (4 Replies)
Discussion started by: dagamier
4 Replies

9. Shell Programming and Scripting

Search row by row from one file to another file if match is found print few colums of file 2

this is the requirement list.txt table1 table2 table3 testfile.txt name#place#data#select * from table1 name2#place2#data2#select * from table 10 innerjoin table3 name2#place2#data2#select * from table 10 output name place table1 name2 place table3 i tried using awk (7 Replies)
Discussion started by: vamsekumar
7 Replies

10. UNIX for Beginners Questions & Answers

awk to parse current and next row in tab-delimited file

Hi there, I would like to use awk to reformat a tab-delimited file containing three columns as follows: Data file: sample 1 173 sample 269 530 sample 687 733 sample 1699 1779 Desired output file: sample 174..265, 531..686, 734..1698 I need the value... (5 Replies)
Discussion started by: emiley
5 Replies
IO::Socket::UNIX(3pm)					 Perl Programmers Reference Guide				     IO::Socket::UNIX(3pm)

NAME
IO::Socket::UNIX - Object interface for AF_UNIX domain sockets SYNOPSIS
use IO::Socket::UNIX; DESCRIPTION
"IO::Socket::UNIX" provides an object interface to creating and using sockets in the AF_UNIX domain. It is built upon the IO::Socket interface and inherits all the methods defined by IO::Socket. CONSTRUCTOR
new ( [ARGS] ) Creates an "IO::Socket::UNIX" object, which is a reference to a newly created symbol (see the "Symbol" package). "new" optionally takes arguments, these arguments are in key-value pairs. In addition to the key-value pairs accepted by IO::Socket, "IO::Socket::UNIX" provides. Type Type of socket (eg SOCK_STREAM or SOCK_DGRAM) Local Path to local fifo Peer Path to peer fifo Listen Create a listen socket If the constructor is only passed a single argument, it is assumed to be a "Peer" specification. NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE As of VERSION 1.18 all IO::Socket objects have autoflush turned on by default. This was not the case with earlier releases. NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE METHODS
hostpath() Returns the pathname to the fifo at the local end peerpath() Returns the pathanme to the fifo at the peer end SEE ALSO
Socket, IO::Socket AUTHOR
Graham Barr. Currently maintained by the Perl Porters. Please report all bugs to <perlbug@perl.org>. COPYRIGHT
Copyright (c) 1996-8 Graham Barr <gbarr@pobox.com>. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.16.2 2012-10-11 IO::Socket::UNIX(3pm)
All times are GMT -4. The time now is 12:03 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy