need help to split report


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting need help to split report
# 1  
Old 03-20-2006
need help to split report

I wrote one script to generate total number of Test cases failures of system as per the host and version .

I want to split number of test cases failures, as per the product .

The logs contain output .

I want to generate output like this


Version Host DB OPC Proxeco Total
7 Eagle 20 10 5 35
7.1 Animator 35 40 2 77
8 Eagle 20 5 4 29


I am posting my scripts and test log also . Please help me to divide it into further part.



_-------------------------------------------------------------------------
#!/bin/sh

#sh gdata.sh /users/testsuite/db/SiCat/

DATE=`date '+20%y-%m-%d'`

for i in /users/testsuite/db/SiCat/$DATE/* ; do

## It generates the total sum of failuers as per the host and productwise .

find $i -name daily -prune -o -name run.log -print -exec grep -c ! {} \;;done > /users/testsuite/db/SiCat/SiCathist/$DATE.log


cat /users/testsuite/db/SiCat/SiCathist/$DATE.log | paste - - | tr "/" " " | cut -d" " -f7,8,9 | sed -e 's/run.log/ /g'> /users/testsuite/db/SiCat/SiCathist/$DATE.log
# 2  
Old 03-20-2006
waiting for reply pls help me
# 3  
Old 03-20-2006
currently it is generating output

7 Animator 50
8 eagle 30
8 Animator 15


but i want to split total number of failuers as per the DB , Proxeco and other

i can hardcord this names in shell scripting .

pls help me
# 4  
Old 03-20-2006
Just a reminder from the forum rules ...

(4) Do not 'bump up' questions if they are not answered promptly. No duplicate or cross-posting and do not report a post where your goal is to get an answer more quickly.

===================================

anyways, post your complete script in between code tags --- the "#" button near the top of the edit box --- to make it look prettier and easier to debug ... also post a sample of your input file data ... people will be able to help you quicker if you help them out ...

... and while you're waiting for a response, read the current threads in the "Unix for Dummies" forum as well as do a search on splitting data in this forum --- it seems to me that a question similar to yours is posted in these forums at least once a week ... good luck!
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Split and Rename Split Files

Hello, I need to split a file by number of records and rename each split file with actual filename pre-pended with 3 digit split number. What I have tried is the below command with 2 digit numeric value split -l 3 -d abc.txt F (# Will Produce split Files as F00 F01 F02) How to produce... (19 Replies)
Discussion started by: techedipro
19 Replies

2. Shell Programming and Scripting

How can i split this.. :)?

hello, :) How can i split this.. :) 10.25.10.2 two octet a=2 b=5 Thank you... (23 Replies)
Discussion started by: networksherlock
23 Replies

3. Shell Programming and Scripting

awk to split one field and print the last two fields within the split part.

Hello; I have a file consists of 4 columns separated by tab. The problem is the third fields. Some of the them are very long but can be split by the vertical bar "|". Also some of them do not contain the string "UniProt", but I could ignore it at this moment, and sort the file afterwards. Here is... (5 Replies)
Discussion started by: yifangt
5 Replies

4. Shell Programming and Scripting

Split

Hello people, I have a huge file of say 1 gb called A123.txt.. to get the word count, i do wc -l A123.txt This gives me a count of say 122898. Now what i do is, i divide this by 4 ie. 122888/4=30722 Now i copy the content as per the above count (30722) and give some name to... (6 Replies)
Discussion started by: j_panky
6 Replies

5. Shell Programming and Scripting

Split one file to Multiple file with report basis in unix

Hi, Please help on this. i want split the below file(11020111.CLT) to more files with some condition. :b: 1) %s stating of the report 2) %e ending of the report example starting of the report: %sAEGONCA| |MUMBAI | :EXPC|N|D ending of the report %eAEGONCA| |MUMBAI | :EXPC 3)so the... (10 Replies)
Discussion started by: krbala1985
10 Replies

6. Shell Programming and Scripting

split()

Hi there, Can someone tell me why the why the element of output is not the same order as the original data? Below is the value of column 11 of 2nd line,... (4 Replies)
Discussion started by: phoeberunner
4 Replies

7. Shell Programming and Scripting

help with split

I have a file that reads "#ID, First, P1(40), P2(40), P3(40)..." and I need to split this line up. I first did @scores = split(/,/, $input); But I need to split it up and get the the parentheses with numbers split up too, in order to add them together later. I know I need to do at least... (1 Reply)
Discussion started by: Hawks444
1 Replies

8. UNIX for Dummies Questions & Answers

Split BIG report using nawk

I have the following nawk script: nawk -F: '{ if($0 ~ "^Report No") {fl=1; i=0;} if(fl==1){data=$0; i++} if($0 ~ "^BE NO:") { fname = "reprot_"$2".lis"; gsub(" ","",fname); for(j=0;j<i;j++) print data > fname; fl=0; } else if(fl==0) print $0 > fname; }' filename When I try to apply... (1 Reply)
Discussion started by: raychu65
1 Replies

9. Shell Programming and Scripting

Split a Big Report.

Hi All, I am a newbie for Unix Script. I have report like the following: (file name: Report.txt): Report No.: AAA BE NO: 111 asfsdflsjdfklsdjfklsjfklsfsflsjdlk fsdfjsfkjsklfsfj Report No.: AAA BE NO: 111 sdfsdfjsdklfjsfkj fsdflkjsdfklsjkl Report No.: AAA (16 Replies)
Discussion started by: raychu65
16 Replies

10. UNIX for Dummies Questions & Answers

Split a file with no pattern -- Split, Csplit, Awk

I have gone through all the threads in the forum and tested out different things. I am trying to split a 3GB file into multiple files. Some files are even larger than this. For example: split -l 3000000 filename.txt This is very slow and it splits the file with 3 million records in each... (10 Replies)
Discussion started by: madhunk
10 Replies
Login or Register to Ask a Question