Sponsored Content
Top Forums Shell Programming and Scripting Total record count of all the file present in a directory Post 303005867 by STCET22 on Tuesday 24th of October 2017 08:48:14 AM
Old 10-24-2017
Total record count of all the file present in a directory

Hi All ,
We need one help on the below requirement.We have multiple pipe delimited .txt file(around 100 .txt files) present on one directory.We need the total record count of all the files present in that directory without header.File format as below :

Code:
 COUPON_CODE|FRIENDLY_CODE|BRAND|EVENT_NAME|EVENT_ID|MASTER_CAMPAIGN_NAME|CAMPAIGN_COMMON_NAME|WEB_PROMO_ID|POS_PROMO_ID|MAX_STORE_USAGE_LIMIT|MAX_ECOMMERCE_USAGE_LIMIT|IS_REDEEMED|IS_EXPIRED|BARCODE_URL|WEB_REDEMPTION_COUNT|STORE_REDEMPTION_COUNT|CREATED_DATE|UPDATED_AT|START_DATE|EXPIRY_DATE|DO_NOT_EXPIRE|SUBCUSTOMER_ID|SUBCUSTOMER_SC_ID|IS_TEST_CODE|IS_CSR_CODE|REDEMPTION_AMOUNT_THRESHOLD|COUPON_AMOUNT|JOB_ID|IS_REWARDS_CERT|REWARDS_CERT_POINTS_APPLIED|REWARDS_CERT_AMOUNT_ISSUED|ISSUANCE_DATE|WEB_PROMOTION_NAME|STORE_PROMOTION_NAME|EVENT_CODE
12W51PS2PK98387|GWIN17DOL25|Gymboree|Gymboree Holiday 2 Winter DM $25 off $100|||Gym Winter 2 DM|||1|1|N|N||0|0|09/26/2017|09/26/2017|11/20/2017|12/24/2017|N||||N||||N|||11/13/2017|||98387
12W51QRB2N98387|GWIN17DOL25|Gymboree|Gymboree Holiday 2 Winter DM $25 off $100|||Gym Winter 2 DM|||1|1|N|N||0|0|09/26/2017|09/26/2017|11/20/2017|12/24/2017|N||||N||||N|||11/13/2017|||98387
12W51QZV5T98387|GWIN17DOL25|Gymboree|Gymboree Holiday 2 Winter DM $25 off $100|||Gym Winter 2 DM|||1|1|N|N||0|0|09/26/2017|09/26/2017|11/20/2017|12/24/2017|N||||N||||N|||11/13/2017|||98387

for one file ,we can get the record count like below :
Code:
 wc -l file1.txt

Can anyone kindly help me how to get total record count of all the .txt files present in that directory without header.Any help on this regard will be appreciated.Thanks !
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to count the record count in an EBCDIC file.

How do I get the record count in an EBCDIC file on a Linux Box. :confused: (1 Reply)
Discussion started by: oracle8
1 Replies

2. Shell Programming and Scripting

To find the count of records from tables present inside a file.

hi gurus, I am having a file containing a list of tables.i want to find the count of records inside thes tables. for this i have to connect into database and i have to put the count for all the tables inside another file i used the following loop once all the tablenames are inside the file. ... (1 Reply)
Discussion started by: navojit dutta
1 Replies

3. UNIX for Advanced & Expert Users

Count total file downloaded using FTP

Hi All, I'm developing a FTP script as below: ftp -v -n <IP_ADDRESS> << EOF user avery jSqaqUU2 lcd /directory/folder/ ascii prompt mget * bye EOF I would like to enhance the script to count the total file downloaded. For example, once the script run i want the message "Total <n>... (1 Reply)
Discussion started by: cas553
1 Replies

4. Shell Programming and Scripting

perl script on how to count the total number of lines of all the files under a directory

how to count the total number of lines of all the files under a directory using perl script.. I mean if I have 10 files under a directory then I want to count the total number of lines of all the 10 files contain. Please help me in writing a perl script on this. (5 Replies)
Discussion started by: adityam
5 Replies

5. Shell Programming and Scripting

csv file - adding total to a trailer record

Hi, I have a script which creates and modifies a csv file. I have managed to do everything I need to do apart from 1 thing. I need to append a trailer record to the file. I need this line to hold the total of an entire column of the csv file (skipping the 1st line which is a header). Can... (2 Replies)
Discussion started by: mcclunyboy
2 Replies

6. Shell Programming and Scripting

Help with sum total number of record and total number of record problem asking

Input file SFSQW 5192.56 HNRNPK 611.486 QEQW 1202.15 ASDR 568.627 QWET 6382.11 SFSQW 4386.3 HNRNPK 100 SFSQW 500 Desired output file SFSQW 10078.86 3 QWET 6382.11 1 QEQW 1202.15 1 HNRNPK 711.49 2 ASDR 568.63 1 The way I tried: (2 Replies)
Discussion started by: patrick87
2 Replies

7. Shell Programming and Scripting

Need unix commands to delete records from one file if the same record present in another file...

Need unix commands to delete records from one file if the same record present in another file... just like join ... if the record present in both files.. delete from first file or delete the particular record and write the unmatched records to new file.. tried with grep and while... (6 Replies)
Discussion started by: msathees
6 Replies

8. UNIX for Dummies Questions & Answers

Count total image in directory

Dear all, I have a directory consisted of files in .jpg, .jpeg etc..all of them are image 20140411030143_62811159403_92886.jpg 5/11/2014 15:01 197K 20140415024737_62811618747_116460.jpg 4/15/2014 14:47 17K 20140415031003_62811618747_109192.jpg 4/17/2014 15:10 17K... (4 Replies)
Discussion started by: radius
4 Replies

9. Shell Programming and Scripting

Speed : awk command to count the occurrences of fields from one file present in the other file

Hi, file1.txt AAA BBB CCC DDD file2.txt abc|AAA|AAAabcbcs|fnwufnq bca|nwruqf|AAA|fwfwwefwef fmimwe|BBB|fnqwufw|wufbqw wcdbi|CCC|wefnwin|wfwwf DDD|wabvfav|wqef|fwbwqfwfe i need the count of rows of file1.txt present in the file2.txt required output: AAA 2 (10 Replies)
Discussion started by: mdkm
10 Replies
MESSAGES.MAILUTILS(1)						   User Commands					     MESSAGES.MAILUTILS(1)

NAME
messages.mailutils - count the number of messages in a mailbox SYNOPSIS
messages.mailutils [OPTION...] [mailbox...] DESCRIPTION
GNU messages -- count the number of messages in a mailbox -q, -s, --[no-]quiet, --silent only display number of messages Global debugging settings --debug-level=LEVEL set Mailutils debugging level --[no-]debug-line-info show source info with debugging messages Configuration handling --config-file=FILE load this configuration file; implies --no-config --config-lint check configuration file syntax and exit --config-verbose verbosely log parsing of the configuration files --no-config do not load site and user configuration files --no-site-config do not load site-wide configuration file --no-user-config do not load user configuration file --set=PARAM=VALUE set configuration parameter Informational options --config-help show configuration file summary --show-config-options show compilation options -?, --help give this help list --usage give a short usage message -V, --version print program version Mandatory or optional arguments to long options are also mandatory or optional for any corresponding short options. REPORTING BUGS
Report bugs to <bug-mailutils@gnu.org>. GNU Mailutils home page: <http://mailutils.org> General help using GNU software: <http://www.gnu.org/gethelp/> COPYRIGHT
Copyright (C) 2007-2017 Free Software Foundation, inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. SEE ALSO
The complete GNU mailutils documentation is maintained as a Texinfo manual. If the mailutils-doc package is installed, the command info mailutils should give you access to the complete manual. You can also find this manual online in the GNU mailutils webpage: https://www.gnu.org/software/mailutils/manual/index.html. Please note this manpage was automatically generated by the Debian mailutils packagers. Do not file bugs for its content to the GNU Mailu- tils upstream authors. FSF
November 2017 MESSAGES.MAILUTILS(1)
All times are GMT -4. The time now is 04:15 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy