Sponsored Content
Top Forums Shell Programming and Scripting Reading and analysing data in a text file Post 302479879 by rajneesh_kapoor on Monday 13th of December 2010 06:50:21 AM
Old 12-13-2010
Reading and analysing data in a text file

Hi,
I have below type of data in a text file in unix.
Emp_Name Emp_Dept
Raj 101
Amruta 100
Shilpa 100
Rohit 123
Amol 198
Rosh 101
Gaurav 198


Number of employees can be even more.
Need a command or a shell script which gives the output as dept number and no. of employees in individual department.
For eg
100 2
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Using loop reading a file,retrieving data from data base.

Hi All, I am having trouble through, I am reading the input from tab delimited file containing several records, e.g. line1 field1 field2 field3 so on.. line2 field1 field2 field3 so on.. .. .. on the basis of certain fields for each record in input file, I have to retrieve... (1 Reply)
Discussion started by: Sonu4lov
1 Replies

2. UNIX for Dummies Questions & Answers

Help analysing progress of a log file

Is it possible to track the progress of a job (informatica) by analysing the progress of it's log file ? I have a long running job, and no way of tracking how far allong it is. Thanks. (4 Replies)
Discussion started by: cosmos328is
4 Replies

3. HP-UX

Query: Analysing the Core file

Hi, Is there any way to find the mode of the binary file (debug or release) by analyzing the core file generated by that binary on the HPUX11i Platform? (5 Replies)
Discussion started by: Prajakta
5 Replies

4. Shell Programming and Scripting

reading data from .ini file

Hi, I have a sample data file that contains name-value pairs in it. For example: name1=value1 name2=value2 name3=value3 ... ... ... My concern is 1. How to get values of name1, name2, name3 using korn shell script? 2. I don't want to access each varible using $name1,$name2, $name3... (2 Replies)
Discussion started by: vinna
2 Replies

5. Shell Programming and Scripting

how to insert data into database by reading it from a text file??

Hi....can you guys help me out in this script?? Below is a text file and it contains these: GEF001 000093625 MKL002510 000001 000000 000000 000000 000000 000000 000001 GEF001 000093625 MKL003604 000001 000000 000000 000000 000000 000000 000001 GEF001 000093625 MKL005675 000001... (4 Replies)
Discussion started by: pallavishetty
4 Replies

6. Shell Programming and Scripting

Reading data from a specific line in a text file

hello, I have got the following problem that I am hoping someone can help with please. 1. I have got the following text file (below) , the columns data are 'Test Day', 'Board', 'Betting Number'. TEXT FILE ============================================ 1 3 02-01-27-28-29-30 0 1... (1 Reply)
Discussion started by: jermaine4ever
1 Replies

7. Shell Programming and Scripting

Reading data from a specific line in a text file

Hello, I have a problem which is giving me headache for days, can some please help. Please see code and text fiel below. Please see text in red for the problem I am facing # Program gets an input x from user while read line ; do echo... (4 Replies)
Discussion started by: jermaine4ever
4 Replies

8. Shell Programming and Scripting

Perl: Reading data from other file

Hi, I am writting some perl scripts for daily backup process. In which I want to pass some data/referance from another txt file. Text file contains only one column and multiple rows. I want to pass this data to variables of another perl script. e.g. Refdoc.txt file contains data as: perl1... (3 Replies)
Discussion started by: n.dba
3 Replies

9. Shell Programming and Scripting

reading data from a file to an array

I need some help with this code below, i doesnt know why it will run twice with my function, but my function only got if else, any other way that can read line and put into array? while read line; do read -A array <<<$line n=${#array} for ((i=1;i<$n;i++)); do print... (1 Reply)
Discussion started by: gavin_L
1 Replies

10. Shell Programming and Scripting

Reading data from file using awk

I have a file as below. It contains two data sets separated by >. I want to pipe each data set to another program called psxy. How can I get the different records Have started doing as follows but it only passes the first data set awk 'BEGIN {RS=">"};{print $0}' p.dat cat p.dat... (12 Replies)
Discussion started by: kristinu
12 Replies
TM::Coverage(3pm)					User Contributed Perl Documentation					 TM::Coverage(3pm)

NAME
TM::Coverage - Topic Maps, Code Coverage DESCRIPTION
This auxiliary package keeps track of the code coverage. Probably quite irrelevant for a user. Automatically generated for TM (1.44). ---------------------------- ------ ------ ------ ------ ------ ------ ------ File stmt bran cond sub pod time total ---------------------------- ------ ------ ------ ------ ------ ------ ------ blib/lib/TM.pm 96.4 84.5 58.0 93.7 90.6 27.5 89.6 blib/lib/TM/Analysis.pm 100.0 90.9 n/a 100.0 100.0 0.0 97.5 blib/lib/TM/AsTMa/Fact.pm 100.0 n/a n/a 100.0 n/a 0.0 100.0 blib/lib/TM/AsTMa/Fact2.pm 100.0 n/a n/a 100.0 n/a 0.0 100.0 blib/lib/TM/Bulk.pm 76.8 71.4 62.5 85.7 100.0 0.0 75.3 blib/lib/TM/CTM/CParser.pm 65.6 34.3 31.0 84.6 0.0 1.6 52.5 blib/lib/TM/CTM/Parser.pm 90.9 50.0 n/a 100.0 0.0 0.0 79.4 blib/lib/TM/DM.pm 100.0 65.0 66.7 100.0 n/a 0.0 96.5 blib/lib/TM/Graph.pm 99.1 88.5 n/a 100.0 100.0 0.0 97.4 blib/lib/TM/Index.pm 100.0 80.0 60.0 100.0 83.3 0.3 87.8 .../Index/Characteristics.pm 100.0 100.0 n/a 100.0 0.0 0.0 97.0 blib/lib/TM/Index/Match.pm 98.5 87.5 n/a 100.0 100.0 0.5 97.6 blib/lib/TM/LTM/CParser.pm 84.9 45.3 42.7 98.2 0.0 0.2 67.8 blib/lib/TM/LTM/Parser.pm 95.7 62.5 50.0 100.0 0.0 0.0 87.1 blib/lib/TM/Literal.pm 45.8 0.0 11.8 30.0 0.0 0.4 24.2 blib/lib/TM/MapSphere.pm 96.5 84.6 68.8 100.0 100.0 0.0 91.7 .../TM/Materialized/AsTMa.pm 100.0 n/a n/a 100.0 0.0 0.0 95.5 ...ib/TM/Materialized/LTM.pm 100.0 n/a n/a 100.0 0.0 0.0 95.5 .../TM/Materialized/MLDBM.pm 100.0 83.3 n/a 100.0 0.0 0.0 92.6 ...b/TM/Materialized/Null.pm 100.0 n/a n/a 100.0 n/a 0.0 100.0 ...TM/Materialized/Stream.pm 100.0 100.0 100.0 100.0 0.0 0.0 96.0 ...ib/TM/Materialized/XTM.pm 100.0 n/a n/a 100.0 0.0 0.0 96.7 blib/lib/TM/PSI.pm 100.0 n/a n/a 100.0 n/a 0.0 100.0 blib/lib/TM/QL.pm 91.4 61.5 66.7 100.0 50.0 0.1 83.9 blib/lib/TM/QL/CParser.pm 76.2 42.4 41.9 90.3 0.0 9.1 62.0 blib/lib/TM/QL/PE.pm 83.8 77.3 80.0 91.7 0.0 52.5 80.5 blib/lib/TM/QL/TS.pm 65.2 35.4 27.8 70.8 53.3 2.4 56.9 blib/lib/TM/ResourceAble.pm 88.1 87.5 n/a 100.0 100.0 0.0 90.0 .../TM/ResourceAble/MLDBM.pm 100.0 75.0 n/a 100.0 0.0 0.0 94.2 blib/lib/TM/Serializable.pm 94.9 65.6 100.0 100.0 100.0 0.0 84.1 .../TM/Serializable/AsTMa.pm 99.1 87.9 66.7 100.0 100.0 0.0 94.2 ...TM/Serializable/Dumper.pm 100.0 n/a n/a 100.0 0.0 0.0 93.5 ...ib/TM/Serializable/LTM.pm 94.1 n/a n/a 83.3 100.0 0.0 92.0 ...ib/TM/Serializable/XTM.pm 96.3 85.2 72.9 100.0 100.0 0.2 91.5 .../lib/TM/Synchronizable.pm 100.0 75.0 100.0 100.0 100.0 0.0 97.2 ...M/Synchronizable/MLDBM.pm 100.0 50.0 n/a 100.0 0.0 0.0 89.3 ...nchronizable/MapSphere.pm 100.0 63.6 64.3 100.0 100.0 0.0 88.6 ...TM/Synchronizable/Null.pm 100.0 n/a n/a 100.0 0.0 0.0 87.5 blib/lib/TM/Tau.pm 100.0 91.7 80.0 100.0 0.0 0.0 95.6 blib/lib/TM/Tau/Federate.pm 63.2 39.3 n/a 62.5 27.3 0.0 54.5 blib/lib/TM/Tau/Filter.pm 100.0 91.7 66.7 100.0 50.0 0.0 90.0 .../TM/Tau/Filter/Analyze.pm 100.0 n/a n/a 100.0 100.0 0.0 100.0 blib/lib/TM/Tree.pm 100.0 57.1 44.4 100.0 66.7 0.0 88.0 blib/lib/TM/Utils.pm 100.0 50.0 n/a 100.0 0.0 0.0 89.3 ...ib/TM/Utils/TreeWalker.pm 100.0 100.0 n/a 100.0 0.0 0.0 96.0 ...ib/TM/Workbench/Plugin.pm 100.0 n/a n/a 100.0 0.0 0.0 75.0 ...M/Workbench/Plugin/Tau.pm 87.5 50.0 n/a 80.0 0.0 0.0 73.1 yapp/astma-fact.yp 96.9 91.5 73.3 97.8 0.0 4.8 92.7 yapp/astma2-fact.yp 97.4 91.6 58.3 100.0 0.0 0.2 91.6 Total 76.8 45.2 40.2 91.2 57.0 100.0 63.8 ---------------------------- ------ ------ ------ ------ ------ ------ ------ SEE ALSO
TM COPYRIGHT AND LICENSE
Copyright 200[8] by Robert Barta, <drrho@cpan.org> This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.10.1 2008-10-05 TM::Coverage(3pm)
All times are GMT -4. The time now is 11:34 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy