Sponsored Content
Top Forums Shell Programming and Scripting finding null records in data file Post 302102294 by vgersh99 on Tuesday 9th of January 2007 02:17:35 PM
Old 01-09-2007
Code:
nawk -F'|' -v OFS='|' '!$2' myFile

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

concatenating static string to records in data file

I just need to add a static ID to each output record so the users will be able to tell which group records in combined flatfiles come from I have the static ID in a bourne variable. I tried awk '{print "${GroupID}" $0}' infile > outfile But I ended up with the string ${GroupID} instead of... (5 Replies)
Discussion started by: gillbates
5 Replies

2. Shell Programming and Scripting

awk script required for finding records in 1 file with corresponding another file.

Hi, I have a .txt file (uniqfields.txt) with 3 fields separated by " | " (pipe symbol). This file contains unique values with respect to all these 3 fields taken together. There are about 40,000 SORTED records (rows) in this file. Sample records are given below. 1TVAO|OVEPT|VO... (2 Replies)
Discussion started by: RRVARMA
2 Replies

3. Shell Programming and Scripting

exclude records with null fields

Hi, can I do something like this to add a condition of checking if the 4th field is number or space or blank also: awk -F, '$4 /^*||*/' MYFILE >> OTHERFILE I also want the other part i.e. I need to exclude all lines whose 4th field is space or blank or number: MYFILE a,b,c,d,e a,b,c,2,r... (2 Replies)
Discussion started by: praveenK_Dudala
2 Replies

4. Shell Programming and Scripting

Extract data from large file 80+ million records

Hello, I have got one file with more than 120+ million records(35 GB in size). I have to extract some relevant data from file based on some parameter and generate other output file. What will be the besat and fastest way to extract the ne file. sample file format :--... (2 Replies)
Discussion started by: learner16s
2 Replies

5. Shell Programming and Scripting

Awk to Count Records with not null

Hi, I have a pipe seperated file I want to write a code to display count of lines that have 20th field not null. nawk -F"|" '{if ($20!="") print NR,$20}' xyz..txt This displays records with 20th field also null. I would like output as: (4 Replies)
Discussion started by: pinnacle
4 Replies

6. UNIX and Linux Applications

Initializing columns to NULL an saving data to a new file

Hi I've been trying to delete columns from a file, and the best option I could come up was to initialise them to NULL. The reason for this is because I need to compare the differences between 2 files with those specific columns excluded. Here is my script: #!/bin/bash... (4 Replies)
Discussion started by: ladyAnne
4 Replies

7. Shell Programming and Scripting

Finding Data in the file

Hi All I have a file having columns such as AAA,BBB,CCC,Aug 13 2013 AAA,BBB,CCC,Aug 11 2013 AAA,BBB,CCC,Aug 12 2013 AAA,BBB,CCC,Aug 13 2013 Now I need to extract the records which are not of todays date (Considering Today date is 13-Aug-2013 So I should get below records... (10 Replies)
Discussion started by: Prashantckc
10 Replies

8. Shell Programming and Scripting

UNIX scripting for finding duplicates and null records in pk columns

Hi, I have a requirement.for eg: i have a text file with pipe symbol as delimiter(|) with 4 columns a,b,c,d. Here a and b are primary key columns.. i want to process that file to find the duplicates and null values are in primary key columns(a,b) . I want to write the unique records in which... (5 Replies)
Discussion started by: praveenraj.1991
5 Replies

9. Shell Programming and Scripting

How can I retrieve the matching records from data file mentioned?

XYZNA0000778800Z 16123000012300321000000008000000000000000 16124000012300322000000007000000000000000 17234000012300323000000005000000000000000 17345000012300324000000004000000000000000 17456000012300325000000003000000000000000 9 XYZNA0000778900Z 16123000012300321000000008000000000000000... (8 Replies)
Discussion started by: later_troy
8 Replies

10. UNIX for Beginners Questions & Answers

Finding records NOT on another file

I have three files named ALL, MATCH, and DIFF. Match and diff have completely different records included in the "all" file, but the "all" file also has records not in either the Match or Diff files. I know I can sort all three files together, one unique and one without that option to show which... (5 Replies)
Discussion started by: wbport
5 Replies
fwtmp(1M)																 fwtmp(1M)

NAME
fwtmp, wtmpfix - manipulate connect accounting records SYNOPSIS
[files] DESCRIPTION
fwtmp reads from the standard input and writes to the standard output, converting binary records of the type found in to formatted ASCII records. The ASCII version is useful to enable editing, via ed(1), bad records or for general purpose maintenance of the file. The argument is used to denote that input is in ASCII form, and output is to be written in binary form. The arguments and are independent, respectively specifying ASCII input and binary output. Therefor, is an ASCII to ASCII copy and is a binary to binary copy. should be used for reading If is not used, structure is read. wtmpfix examines the standard input or named files in format, corrects the time/date stamps to make the entries consistent, and writes to the stan- dard output. A can be used in place of files to indicate the standard input. If time/date corrections are not performed, will fault when it encounters certain date-change records. Each time the date is set, a pair of date change records is written to The first record is the old date denoted by the string old time placed in the line field and the flag placed in the type field of the structure. The second record specifies the new date, and is denoted by the string placed in the line field and the flag placed in the type field. uses these records to synchronize all time stamps in the file. nullifies date change records when writing to the standard output by setting the time field of the structure in the old date change record equal to the time field in the new date change record. This prevents and from factoring in a date change record pair more than once. In addition to correcting time/date stamps, wtmpfix checks the validity of the name field to ensure that it consists solely of alphanumeric characters or spaces. If it encounters a name that is considered invalid, it changes the login name to and writes a diagnostic to the standard error. This minimizes the risk that will fail when processing connect accounting records. DIAGNOSTICS
wtmpfix generates the following diagnostics messages: WARNINGS
generates no errors, even on garbage input. FILES
SEE ALSO
ed(1), acct(1M), acctcms(1M), acctcom(1M), acctcon(1M), acctmerg(1M), acctprc(1M), acctsh(1M), runacct(1M), acct(2), acct(4), utmp(4), wtmps(4). STANDARDS CONFORMANCE
fwtmp(1M)
All times are GMT -4. The time now is 09:49 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy