Sponsored Content
Top Forums Shell Programming and Scripting Shell script for field wise record count for different Files .csv files Post 302964925 by Kirands on Thursday 21st of January 2016 06:55:16 AM
Old 01-21-2016
Hi Ravinder,

Thank you for your prompt response.

I have tested the code given by you, but its still have some issues in giving the correct record count.

Please find the attached source file that has the data and the two headers., the record count should be from the 3rd row.
Please help to resolve this issue.

Thanks for your support.

Regards,
Kiran.
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Comparison of record count of two files

Hi, I have one text file and zip file in UNIX directory.The Zip file contains another text file. For Ex: Text File Name = Req_file.txt Zip file Name= Response_file.txt_04072009_121548.gz Zip file contains one text file that name is Response_file.txt I want to compare the record... (1 Reply)
Discussion started by: praka
1 Replies

2. Shell Programming and Scripting

Combine Multiple text or csv files column-wise

Hi All I am trying to combine columns from multiple text files into a single file using paste command but the record length being unequal in the different files the data is running over to the closest empty cell on the left. Please see below. What can i do to resolve this ? File 1 File... (15 Replies)
Discussion started by: venky_ibm
15 Replies

3. Shell Programming and Scripting

count of record in files

Hi all, I have written a scripts which count number of lines in all the files in a directory and write in a text file. I don't know how to format it while writing. OS suns solaris 10 my scripts is as below for i in /ersdg3/ERS/ERS_INPUT_LOGS/RIO/LOGS/RIO_02-Aug-2012/ *.LOG do echo... (11 Replies)
Discussion started by: guddu_12
11 Replies

4. Shell Programming and Scripting

Script to compare count of two csv files

Hi Guys, I need to write a script to compare the count of two csv files each having 5 columns. Everyday a csv file is recived. Now we need to compare the count of todays csv file with yesterday's csv file and if the total count of records is same in todays csv file and yesterday csv file out... (3 Replies)
Discussion started by: Vivekit82
3 Replies

5. Shell Programming and Scripting

Record count checking for multiple files through for-loop

Hi Friends, I wrote one shell script to check the record count in two files and that will send us the notification activity if found zero record count. What i did is I created for loop and checking the count for both of the files but what is happening is for first file has data then it's... (13 Replies)
Discussion started by: victory
13 Replies

6. Shell Programming and Scripting

How to create or convert to pdf files from csv files using shell script?

Hi, Can anyone help me how to convert a .csv file to a .pdf file using shell script Thanks (2 Replies)
Discussion started by: ssk250
2 Replies

7. Shell Programming and Scripting

Match columns from two csv files and update field in one of the csv file

Hi, I have a file of csv data, which looks like this: file1: 1AA,LGV_PONCEY_LES_ATHEE,1,\N,1,00020460E1,0,\N,\N,\N,\N,2,00.22335321,0.00466628 2BB,LES_POUGES_ASF,\N,200,200,00006298G1,0,\N,\N,\N,\N,1,00.30887539,0.00050312... (10 Replies)
Discussion started by: djoseph
10 Replies

8. Shell Programming and Scripting

Extract count of string in all files and display on date wise

Hi All, hope you all are doing well! I kindly ask you for shell scripting help, here is the description: I have huge number of files shown below on date wise, which contains different strings(numbers you can say) including 505001 and 602001. ... (14 Replies)
Discussion started by: VasuKukkapalli
14 Replies

9. Shell Programming and Scripting

Finding total distinct count from multiple csv files through UNIX script

Hi All , I have multiple pipe delimited csv files are present in a directory.I need to find out distinct count on a column on those files and need the total distinct count on all files. We can't merge all the files here as file size are huge in millions.I have tried in below way for each... (9 Replies)
Discussion started by: STCET22
9 Replies
MPXIO(5)							File Formats Manual							  MPXIO(5)

NAME
mpxio - multiplexed i/o SYNOPSIS
#include <sys/mx.h> #include <sgtty.h> DESCRIPTION
Data transfers on mpx files (see mpx(2)) are multiplexed by imposing a record structure on the io stream. Each record represents data from/to a particular channel or a control or status message associated with a particular channel. The prototypical data record read from an mpx file is as follows struct input_record { short index; short count; short ccount; char data[]; }; where index identifies the channel, and count specifies the number of characters in data. If count is zero, ccount gives the size of data, and the record is a control or status message. Although count or ccount might be odd, the operating system aligns records on short (i.e. 16-bit) boundaries by skipping bytes when necessary. Data written to an mpx file must be formatted as an array of record structures defined as follows struct output_record { short index; short count; short ccount; char *data; }; where the data portion of the record is referred to indirectly and the other cells have the same interpretation as in input_record. The control messages listed below may be read from a multiplexed file descriptor. They are presented as two 16-bit integers: the first number is the message code (defined in <sys/mx.h>), the second is an optional parameter meaningful only with M_WATCH and M_BLK. M_WATCH - a process `wants to attach' on this channel. The second parameter is the 16-bit user-id of the process that executed the open. M_CLOSE - the channel is closed. This message is generated when the last file descriptor referencing a channel is closed. The detach command (see mpx(2) should be used in response to this message. M_EOT - indicates logical end of file on a channel. If the channel is joined to a typewriter, EOT (control-d) will cause the M_EOT message under the conditions specified in tty(4) for end of file. If the channel is attached to a process, M_EOT will be gener- ated whenever the process writes zero bytes on the channel. M_BLK - if non-blocking mode has been enabled on an mpx file descriptor xd by executing ioctl(xd, MXNBLK, 0), write operations on the file are truncated in the kernel when internal queues become full. This is done on a per-channel basis: the parameter is a count of the number of characters not transferred to the channel on which M_BLK is received. M_UBLK - is generated for a channel after M_BLK when the internal queues have drained below a threshold. Two other messages may be generated by the kernel. As with other messages, the first 16-bit quantity is the message code. M_OPEN - is generated in conjunction with `listener' mode (see mpx(2)). The uid of the calling process follows the message code as with M_WATCH. This is followed by a null-terminated string which is the name of the file being opened. M_IOCTL - is generated for a channel connected to a process when that process executes the ioctl(fd, cmd, &vec) call on the channel file descriptor. The M_IOCTL code is followed by the cmd argument given to ioctl followed by the contents of the structure vec. It is assumed, not needing a better compromise at this time, that the length of vec is determined by sizeof (struct sgttyb) as declared in <sgtty.h>. Two control messages are understood by the operating system. M_EOT may be sent through an mpx file to a channel. It is equivalent to propagating a zero-length record through the channel; i.e. the channel is allowed to drain and the process or device at the other end receives a zero-length transfer before data starts flowing through the channel again. M_IOCTL can also be sent through a channel. The format is identical to that described above. MPXIO(5)
All times are GMT -4. The time now is 03:00 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy