How to get the Invalid records from a file using awk?
My Input file is fixed length record ends with . as end of the line and the character length is 4156
Example:
I need to check is there any control characters(like ^M,^Z)
The line will be splitted
the outptut should be
Is there any way to reduce the if conditions.. or the best way to achieve the ouput
Last edited by Scrutinizer; 04-30-2016 at 01:56 AM..
Reason: Corrected and moved code tags
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)
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)
Hello all,
Would appreciate if someone can help me out on the following requirement.
INPUT FILE:
--------------------------
TPS REPORT
abc def ghi
jkl mon pqr
stu vrs lll
END OF TPS REPORT
TPS REPORT
field1 field2 field3
field4 field5 field6 (8 Replies)
I want to filter records in one of my file using AWK command (or anyother command). I am using the below code
awk -F@ '$1=="0003"&&"$2==20100402" print {$0}' $INPUT > $OUTPUT
I want to pass the 0003 and 20100402 values through a variable. How can I do this?
Any help is much... (1 Reply)
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)
Hello gurus,
I am new to "awk" and trying to break a large file having 4 million records into several output files each having half million but at the same time I want to keep the similar key records in the same output file, not to exist accross the files.
e.g. my data is like:
Row_Num,... (6 Replies)
HI,
I have a source file which has the below data.
Tableid,table.txt
sourceid,1,2,3,4,5,6
targetid,1,2,3,4,5,6
Tableid,table
sourceid,1,2,3,4,5,6
targetid,1,2,3,4,5,6
Tableid,table.txt
sourceid,1,2,3,4,5,6
targetid,1,2,3,4,5,6
Tableid,table
sourceid,1,2,3,4,5,6
targetid,1,2,3,4,5,6... (6 Replies)
Hello,
I have attached one file named file.txt .
I have to create a file using the awk script with the records in which 38th position is P and not V .
ex
it should have
00501 HOLTSVILLE NYP00501
and it should not include
00501 I R S SERVICE CENTER ... (3 Replies)
hi.. I want to compare records present in 1 file with those in 3 other files and print those records of file 1 which are not present in any of the files. for eg -
file1 file2 file3 file4
1 1 5 7
2 2 6 9
3
4
5
6
7
8
9
... (3 Replies)
I have two files and would need to filter out records based on certain criteria, these column are of variable lengths, but the lengths are uniform throughout all the records of the file. I have shown a sample of three records below. Line 1-9 is the item number "0227546_1" in the case of the first... (15 Replies)
Discussion started by: MIA651
15 Replies
LEARN ABOUT OSF1
drem
fmod(3) Library Functions Manual fmod(3)NAME
fmod, drem, remainder - Compute the floating-point remainder
LIBRARY
Math Library (libm.a)
SYNOPSIS
#include <math.h>
double fmod (double x, double y); float fmodf (float x, float y); long double fmodl (long double x,
long double y); double drem (double x, double y); float dremf (float x, float y); long double dreml
(long double x, long double y); double remainder (double x, double y); float remainderf (float x, float y); long double
remainderl (long double x, long double y);
STANDARDS
Interfaces documented on this reference page conform to industry standards as follows:
fmod(): XPG4
remainder(): XPG4-UNIX
Refer to the standards(5) reference page for more information about industry standards and associated tags.
DESCRIPTION
The fmod(), fmodf(), and fmodl() functions return the remainder r = x - n*y, where n = trunc(x/y). The result has the same sign as x and
magnitude less than the magnitude of y. The remainder is computed exactly and |r| is less than |y|.
The drem(), dremf(), dreml(), remainder(), remainderf(), and remainderl() functions return the remainder r = x - n*y, where n = rint(x/y).
Additionally, if |n - x/y|=1/2, then n is even. The remainder is computed exactly and |r| is less than or equal to |y|/2.
The drem() and remainder() functions are aliases of each other. The dremf(), and remainderf() functions are aliases of each other. The
dreml() and remainderl() functions are aliases of each other.
The following table describes function behavior in response to exceptional arguments:
---------------------------------------------------------------------------
Function Exceptional Argument Routine Behavior
---------------------------------------------------------------------------
fmod(), fmodf(), fmodl() x = infinity Invalid argument
fmod(), fmodf(), fmodl() y = 0 Invalid argument
drem(), dremf(), dreml() x = infinity Invalid argument
drem(), dremf(), dreml() y = 0 Invalid argument
remainder() x = infinity Invalid argument
remainderf() x = infinity Invalid argument
remainderl() x = infinity Invalid argument
remainder() y = 0 Invalid argument
remainderf() y = 0 Invalid argument
remainderl() y = 0 Invalid argument
---------------------------------------------------------------------------
delim off
fmod(3)