9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
How to calculate percentage non zero value occurrence base on value col 1 and 2
2017 a 0
2017 a 2
2017 a 4
2017 a 2
2017 a 0
2017 b 2
2017 b 6
2016 a 2
2016 a 2
2016 b 2
2016 b 8
2016 b 0
2016 b 0
2016 c 2
2016 c 2
2016 c 0
i manage to get average
# awk '{A++;B+=$3}END{for(X in... (1 Reply)
Discussion started by: before4
1 Replies
2. Shell Programming and Scripting
Hi there
I am middle of writing a script to allow me to see the % of the memory which is being used.
When I submit my script I don't get any errors but I just get a blank output.
Any pointers?
available=`free -m | grep available`
if
then
... (7 Replies)
Discussion started by: simpsa27
7 Replies
3. UNIX for Beginners Questions & Answers
Hi All,
I currently have a shell script which is pulling multiple counters from various sources. Due to the counters being cumulative counters I've got some code to work out the delta from the last reading and current which is working fine.
The problem i have now is being able to work out the... (8 Replies)
Discussion started by: mutley2202
8 Replies
4. Shell Programming and Scripting
Hello,
I have compiled a script but I have stucked at one point.
Each line contains two pcs of % value and what I want to do is to delete any line if both % values are zero.
data:
expected output:
ow3 should be deleted as both percentage value in related line are equal to zero.
... (2 Replies)
Discussion started by: baris35
2 Replies
5. Shell Programming and Scripting
I have 2 fixed length files input#1 & input#2. I want to match the rows based on the value in position 37-50 in both files (pos 37-50 will have same value in both files).
If any matching record is found then cut the value against company code & Invoice number from input file #1 (position 99 until... (3 Replies)
Discussion started by: Lingaraju
3 Replies
6. Shell Programming and Scripting
I have a CSV file as shown below
"1","SANTHA","KUMAR","SAM,MILLER","DEVELOPER","81,INDIA"
"2","KAPIL","DHAMI","ECO SPORT","DEVELOPER","82,INDIA"
File is comma delimited.All the field values are enclosed by double quotes. But while using awk or cut, it interprets the comma which is present in... (6 Replies)
Discussion started by: santhansk
6 Replies
7. Shell Programming and Scripting
I have two files which have to be compared. One of them has leading & trailing zeroes in certain fields.
file1
----
John,Rambo,20100101,2119.5,3302.39,100.07,22211.0
file2
----
John,Rambo,20100101,000002119.50,0003302.39,00000.07,000022211.00
I am thinking of using diff to... (10 Replies)
Discussion started by: Sheel
10 Replies
8. UNIX for Dummies Questions & Answers
How to calculate percentage of two values in unix. (5 Replies)
Discussion started by: venkatesht
5 Replies
9. Shell Programming and Scripting
Hi, I am having the file which contains the following two columns.
518 _factorial
256 _main
73 _atol
52 ___do_global_ctors
170 ___main
52 ___do_g
How can calculate the percentage of each value in the first column ?
first need to get the sum of the first column and... (3 Replies)
Discussion started by: saleru_raja
3 Replies