Sponsored Content
Top Forums Shell Programming and Scripting End of each line count the values in the file Post 302649845 by bmk on Friday 1st of June 2012 06:25:35 AM
Old 06-01-2012
@Scrutinizer, Filed seperator not an issues... irresptive delemeter...

Thank balajesuri,now it is working fine...i have to include the in unix script...

---------- Post updated at 05:25 AM ---------- Previous update was at 05:19 AM ----------

Thanks...Guru...if i use your command output coming like this.

Code:
Type : 4
Type 8: 3
Type 1: 1
Type 2: 2
Type 3: 1

i don't wan't Type : 4
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Line Count and Append it to the end of the file.

Hi, I want to get a Line count of a file and append that at the end of the file. The Line count should not include the Headers : ------------------ COL1,COL2,COL3 123,abc,011 111,abd,0212 Record Count: 2 ------------------- Thanks. (7 Replies)
Discussion started by: smc3
7 Replies

2. Shell Programming and Scripting

Remove end of values in file

leviathan:/lcl/apps/Tivoli/netcool/omnibus/bin>more pmonfile.dat entp_stdby ot1p_stdby lawp_stdby I am wonder how to remove the _stdby from all the values in this dat file using #!/bin/ksh Thanks! (4 Replies)
Discussion started by: LRoberts
4 Replies

3. Shell Programming and Scripting

How to put count for first element in a file at the end

Hi, I have a file where I need to count the total for the first element and put it back at the end of file... here is the example... input.. FHDR|ABC|20100607| |ABC|8453|CDE|E166|||| 123|ABC|8453|CDE|E166|||| 123|ABC|8453|CDE|E166|||| 111|ABC|8453|CDE|E166||||... (8 Replies)
Discussion started by: donadarsh
8 Replies

4. Shell Programming and Scripting

How to count Unique Values from a file.

Hi I have the following info in a file - <Cell id="25D"/> <Cell id="26A"/> <Cell id="26B"/> <Cell id="26C"/> <Cell id="27A"/> <Cell id="27B"/> <Cell id="27C"/> <Cell id="28A"/> I would like to know how would you go about counting all... (4 Replies)
Discussion started by: Prega
4 Replies

5. Shell Programming and Scripting

Print required values at end of the file by using AWK

I am looking help in awk, quick overview. we will get feed from external system . The input file looks like below. Detail Id Info Id Order Id STATUS Status Date FileDetail 99127942 819718 CMOG223481502 PR 04-17-2011 06:01:34PM... (7 Replies)
Discussion started by: dvrbabu
7 Replies

6. Shell Programming and Scripting

Get the sum of values in between begin and end in the file

Hi All, test file Begin Script Run at Thu Mar 14 09:24:16 PDT 2013 tst_accounts: ws zip: WS_out_20130313.tar.gz dat: test_20130313.dat count: 63574 loaded: xx pre-merge: xx post-merge: xx timestamp: Thu Mar 14 09:30:42 PDT 2013 tst_accounts: ws zip: WS_out_20130313.tar.gz dat: s_20130313.dat... (6 Replies)
Discussion started by: bmk
6 Replies

7. Shell Programming and Scripting

awk to count start and end keyword in a line

Hello fellow awkers and seders: need to figure out a way to ensure a software deployment has completed by checking its trace file in which I can store the deployment results as follows: echo $testvar ===== Summary - Deploy Result - Start ===== ===== Summary - Deploy Result - End =====... (1 Reply)
Discussion started by: ux4me
1 Replies

8. Shell Programming and Scripting

Count the field values in a file

Hi I have a file with contents like : 101,6789556897,0000795369 - seq - fmt_recs187] - avg_recs 101,4678354769,0000835783 - seq - fmt_recs98] - avg_recs 221,5679787008,0001344589 - seq - fmt_recs1283] - avg_recs I need to find the sum of the all the values (which are in bold). here... (6 Replies)
Discussion started by: rkrish
6 Replies

9. Shell Programming and Scripting

How to append word count at end of file?

Hi guys, I have to append the word count of a file at the end of the file name like this - > "filename_2345" where 2345 is the word count of "filename". How do i achieve this using one command ? I am not allowed to store the word count in a variable and then concatenate. Request your... (1 Reply)
Discussion started by: peter2312
1 Replies

10. Shell Programming and Scripting

Perl to extract values and print at end of each line

In the below perl I am trying to extract and print the values AF1=, the GT value, and F or QUAL diveded by 33 (rounded to the nearest whole #). The GT value is at the end after the GT:PL so all the possibilities are read into a hash h, then depending on the value that is in the line the... (1 Reply)
Discussion started by: cmccabe
1 Replies
File::Type::WebImages(3pm)				User Contributed Perl Documentation				File::Type::WebImages(3pm)

NAME
File::Type::WebImages - determine web image file types using magic SYNOPSIS
use File::Type::WebImages 'mime_type'; my $type_1 = mime_type($file); my $type_2 = mime_type($data); DESCRIPTION
"mime_type()" can use either a filename, or file contents, to determine the type of a file. The process involves looking the data at the beginning of the file, sometimes called "magic numbers". THE BIG TRADE OFF
For minimum memory consumption, only the following common web image file types are supported: BMP, GIF, JPEG and PNG. ( image/bmp, image/gif, image/jpeg and image/png ). Unlike with File::Type and File::MMagic, 'undef', not "application/octet-stream" will be returned for unknown formats. Unlike File::Type, we return "image/png" for PNGs, not "image/x-png"; If you want more mime types detected use File::Type or some other module. TODO
It would be even better to have a pluggable system that would allow you to plug-in different sets of MIME-types you care about. SEE ALSO
File::Type. Similar, but supports over 100 file types. ACKNOWLEDGMENTS
File::Type::WebImages is built from a mime-magic file from cleancode.org. The original can be found at <http://cleancode.org/cgi-bin/viewcvs.cgi/email/mime-magic.mime?rev=1.1.1.1>. AUTHORS
Paul Mison <pmison@fotango.com> - wrote original File::Type Mark Stosberg <mark@summersault.com> - hacked up this. COPYRIGHT
Copyright 2003-2004 Fotango Ltd. LICENSE
Licensed under the same terms as Perl itself. perl v5.10.1 2011-04-23 File::Type::WebImages(3pm)
All times are GMT -4. The time now is 09:16 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy