10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
In the awk below I am trying to add a penalty to a score to each matching $1 in file2 based on the sum of $3+$4 (variable TL) from file1. Then the $4 value in file1 is divided by TL and multiplied by 100 (this valvue is variable S). Finally, $2 in file2 - S gives the updated $2 result in file2.... (2 Replies)
Discussion started by: cmccabe
2 Replies
2. Shell Programming and Scripting
Hi everyone,
Here are the contents of a plain text file created by a SQL query:
SUM(T.TRNQTY) COUNT(D.TRNSEQ)
---------------- ----------------
1380 46
1393 59
2680 134
740 37
... (5 Replies)
Discussion started by: gacanepa
5 Replies
3. Shell Programming and Scripting
I'm trying to sum each field of the second column over many different files.
For example:
file1: file2:
1 5 1 5
2 6 2 4
3 5 3 3
To get:
file3
1 10
2 10
3 8
I found answer when there are only 2 files as... (10 Replies)
Discussion started by: rogeriog.em
10 Replies
4. Shell Programming and Scripting
Hi there,
I have 2 files in following format
cat file_1
Storage Group Name: aaaa
HBA UID SP Name SPPort
------- ------- ------
0 21
Storage Group Name: bbbb
HBA UID... (2 Replies)
Discussion started by: jpkumar10
2 Replies
5. UNIX for Dummies Questions & Answers
Can someone tell me how to change the first column in a very large 17k line file from a random 10 digit numeric value to a non numeric value. The format of lines in the file is:
1702938475,SNU022,201004
the first 10 numbers always begin with 170 (6 Replies)
Discussion started by: Bahf1s
6 Replies
6. Shell Programming and Scripting
Hi Friends,
I have a pipe delimited file with 20 million records. I want to perform the sum of the 13 field, for that I am using the code below, but the result is in exponential form. I want the number to be in floating number, so that I can use the number to comparision.
Any help is highly... (3 Replies)
Discussion started by: anandapani
3 Replies
7. Shell Programming and Scripting
This be the latest in my problems sorting through router logs... I'm half way there on a problem, but I've hit the limitation of my knowledge
Got some router interface log files of type
router01:GigabitEthernet9/24 is up, line protocol is up (connected)
router01: 0 input errors, 0 CRC, 0... (7 Replies)
Discussion started by: Yorkie99
7 Replies
8. Shell Programming and Scripting
Hey,
I have a file and it has only one field. I need to calculate the sum of each filed as total.
For e.g my file is
1
2
3
4
5
I need to calculate the total sum as 15.
Please let me know how i can do it? (4 Replies)
Discussion started by: dsravan
4 Replies
9. Shell Programming and Scripting
Hi All,
Is there any code in Perl which can differentiate between numeric and non-numeric input? (11 Replies)
Discussion started by: Raynon
11 Replies
10. Shell Programming and Scripting
HI ALL,
i have a problem when i do a sort sum with many fields.
Is there a limit for fields?
Do you know a solution?
thanks in advance.
the shell is:
# SORT1
SORT1_rcode=777
if ; then
echo "USE $DARSEQ/OTPU.FTPEPREC RECORD F,1000 " > $DARPARSRT/TPEKL508.SORT1_$$.srt
... (6 Replies)
Discussion started by: tullo
6 Replies