10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi
I am having a set of files which will have the card details and the amount that was spending on the card. Each file will have the set of cards and dollar amount spend on it. I am trying to sum the dollar values by card number on each files. Is there a way I do it all in all one steps
File... (1 Reply)
Discussion started by: arunkumar_mca
1 Replies
2. Shell Programming and Scripting
Input file:
101M
10M10D20M1I70M
10M10D39M4I48M
10M10D91M
10M10I13M2I7M1I58M
10M10I15M1D66M
Output file:
101M 101 0 0
10M10D20M1I70M 100 1 10
10M10D39M4I48M 97 4 10
10M10D91M 101 0 10
10M10I13M2I7M1I58M 88 13 0
10M10I15M1D66M 91 10 1
I'm interested to count how many total of... (6 Replies)
Discussion started by: perl_beginner
6 Replies
3. Shell Programming and Scripting
Please help me to write a script
Match with ACNO & NAME if it matched calculate the total val1 val2 val3 and val4 and GT is total of ACNO wise.please check the output
Table
-----------------
1005|ANDP|ACN|20|50|10|30
1005|ANDP|ACN|20|10|30|40
1001|AND|NAC|40|50|40|50... (22 Replies)
Discussion started by: kalia4u
22 Replies
4. Shell Programming and Scripting
Input
`0B0A RDF1+TDEV 45 BL_lmapm03
`0CE7 TDEV 59 BL_lmapm03
`0B09 RDF1+TDEV 70 BL_lmapm02
`0CE6 TDEV 59 BL_lmapm02
`0B08 RDF1+TDEV 70 BL_lmapm01
`0CE5 TDEV 59 BL_lmapm01
Output... (2 Replies)
Discussion started by: greycells
2 Replies
5. Shell Programming and Scripting
Hi
i need to calculate the total of a column from a file in ksh
vi file.txt
System : CBSE ent=0.1 me=Cap
Subject Maths Science
xxxxx 56 98
yyyy 89 67
ooo 67 32
Here i need to calculate only the total of Maths column alone i.e., 56+89+67
... (4 Replies)
Discussion started by: Priresh
4 Replies
6. Shell Programming and Scripting
Hi I have this file which contains
Al,AADESH,id1_0,23,2013-01-28,2,2
Al,AADESH,id1_0,23,2013-01-29,4,4
Al,AADESH,id1_0,23,2013-01-30,2,1
Al,AADESH,id1_0,31,2013-01-29,1,1
Al,AESH,id1_0,31,2013-01-31,2,2
Al,AESH,id2_2,23,2013-01-29,1,1
Al,AESH,id2_2,31,2013-01-31,1,1 ... (5 Replies)
Discussion started by: nikhil jain
5 Replies
7. Shell Programming and Scripting
Input file
11916 30640 9320 51876
5690 15874 4723 26287
5121 12269 2569 19959
9 71 6 86
Desired output file
11916 30640 9320 51876
5690 15874 4723 26287
5121 12269 2569 19959
9 71 6 86
22736 58854 16618 98208
Last part is the total up of first three data.
I used the following... (6 Replies)
Discussion started by: perl_beginner
6 Replies
8. Shell Programming and Scripting
Hello,
I just need to print the # of columns for each line of the input file.
The input file uses the ascii 009 tab character.
I specify this character as the FS (field separator) in the BEGIN section, and I know the FS character is correct because I can print it.
When I try to print the #... (1 Reply)
Discussion started by: script_op2a
1 Replies
9. Shell Programming and Scripting
Here is my file name countries
USSR 8650 262 Asia
Canada 3852 24 North America
China 3692 866 Asia
USA 3615 219 North America
Brazil 3286 116 South America
India 1269 637 Asia
Argentina 1072 ... (8 Replies)
Discussion started by: ironhead3fan
8 Replies
10. Shell Programming and Scripting
Hi, i have a file which content the following:
>cat cols
data a:23:data
data b:76:data
data c:-30:data
i would like to sum up the value of column 2, but the result that return to me is 0. Can anyone help?
i'm using this code to do the sum
awk -F" " 'BEGIN {x=0} {x+=$2} END {print... (5 Replies)
Discussion started by: thh
5 Replies