Sponsored Content
Full Discussion: Parsing records in file
Top Forums Shell Programming and Scripting Parsing records in file Post 302655629 by cabrao on Wednesday 13th of June 2012 11:58:28 AM
Old 06-13-2012
Code:
$ awk -F: 'sub(FS $NF,z)' file
Jun 13 12:59
Jun 13 13:02
Jun 13 13:14

This User Gave Thanks to cabrao For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Count No of Records in File without counting Header and Trailer Records

I have a flat file and need to count no of records in the file less the header and the trailer record. I would appreciate any and all asistance Thanks Hadi Lalani (2 Replies)
Discussion started by: guiguy
2 Replies

2. UNIX for Dummies Questions & Answers

Parsing out records from one huge record

Hi, I have one huge record and know that each record in the file is 550 bytes long. How do I parse out individual records from the single huge record. Thanks, (4 Replies)
Discussion started by: bwrynz1
4 Replies

3. UNIX for Advanced & Expert Users

Parsing records from one record

Hi, I got a file which is one huge record. I know each record should be 550 bytes long. How do I parse out the records from the one huge record. (1 Reply)
Discussion started by: bwrynz1
1 Replies

4. UNIX for Dummies Questions & Answers

Use records from one file to delete records in another file

file_in_1: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 file_in_2: 9 10 11 12 21 22 23 24 1 2 3 4 17 18 19 20 file_out: (5 Replies)
Discussion started by: kenneth.mcbride
5 Replies

5. Shell Programming and Scripting

Parsing of file for Report Generation (String parsing and splitting)

Hey guys, I have this file generated by me... i want to create some HTML output from it. The problem is that i am really confused about how do I go about reading the file. The file is in the following format: TID1 Name1 ATime=xx AResult=yyy AExpected=yyy BTime=xx BResult=yyy... (8 Replies)
Discussion started by: umar.shaikh
8 Replies

6. Shell Programming and Scripting

Parsing record into multiple records in Shell Script

Hi, I am trying to parse a very long record in a text file into multiple records by checking ADD, DELETE, or MODIFY field value in a shell script. Input # File name xyz.txt ADD|N000|8015662|DELETE|N001|9915662|MODIFY|N999|85678 Output ADD|N000|8015662| DELETE|N001|9915662|... (8 Replies)
Discussion started by: naveed
8 Replies

7. UNIX for Dummies Questions & Answers

Grep specific records from a file of records that are separated by an empty line

Hi everyone. I am a newbie to Linux stuff. I have this kind of problem which couldn't solve alone. I have a text file with records separated by empty lines like this: ID: 20 Name: X Age: 19 ID: 21 Name: Z ID: 22 Email: xxx@yahoo.com Name: Y Age: 19 I want to grep records that... (4 Replies)
Discussion started by: Atrisa
4 Replies

8. Shell Programming and Scripting

Need a very specific awk command for parsing records

I have data in a file where the first line of the file identifies the fields. I need to be able to parse out any single record, field-by-field, with the fields identified. So if my file looks like this: NAME, ADDRESS, PHONE Jim Smith, 123 Main Street, 999-888-7777 Bob Jones, 555 Park Avenue,... (6 Replies)
Discussion started by: Finja
6 Replies

9. Shell Programming and Scripting

Deleting duplicate records from file 1 if records from file 2 match

I have 2 files "File 1" is delimited by ";" and "File 2" is delimited by "|". File 1 below (3 record shown): Doc1;03/01/2012;New York;6 Main Street;Mr. Smith 1;Mr. Jones Doc2;03/01/2012;Syracuse;876 Broadway;John Davis;Barbara Lull Doc3;03/01/2012;Buffalo;779 Old Windy Road;Charles... (2 Replies)
Discussion started by: vestport
2 Replies

10. Shell Programming and Scripting

Separate records of a file on 2 types of records

Hi I am new to shell programming in unix Please if I can provide help. I have a file structure of a header record and "N" detail records. The header record will be the total number of detail records I need to split the file in 2: One for the header Another for all detail records Could... (1 Reply)
Discussion started by: jamcogar
1 Replies
LWRES_HSTRERROR(3)						       BIND9							LWRES_HSTRERROR(3)

NAME
lwres_herror, lwres_hstrerror - lightweight resolver error message generation SYNOPSIS
#include <lwres/netdb.h> void lwres_herror(const char *s); const char * lwres_hstrerror(int err); DESCRIPTION
lwres_herror() prints the string s on stderr followed by the string generated by lwres_hstrerror() for the error code stored in the global variable lwres_h_errno. lwres_hstrerror() returns an appropriate string for the error code gievn by err. The values of the error codes and messages are as follows: NETDB_SUCCESS Resolver Error 0 (no error) HOST_NOT_FOUND Unknown host TRY_AGAIN Host name lookup failure NO_RECOVERY Unknown server error NO_DATA No address associated with name RETURN VALUES
The string Unknown resolver error is returned by lwres_hstrerror() when the value of lwres_h_errno is not a valid error code. SEE ALSO
herror(3), lwres_hstrerror(3). COPYRIGHT
Copyright (C) 2004, 2005, 2007, 2012 Internet Systems Consortium, Inc. ("ISC") Copyright (C) 2000, 2001 Internet Software Consortium. BIND9 Jun 30, 2000 LWRES_HSTRERROR(3)
All times are GMT -4. The time now is 10:32 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy