10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I need help with this assignment. I'm very new to using UNIX/LINUX, and my only previous experience with programing anything is using python.
We are writing scripts using vim, and this one I'm stumped on.
"Write a shell script that finds and display the sum of even positive integers from 0 to... (5 Replies)
Discussion started by: Nastybutler
5 Replies
2. Shell Programming and Scripting
Hi,
I am a new bie i need some help with respect to shell onliner;
I have data in following format
Name FromDate UntilDate Active Changed Touched
Test 28-03-2013 28-03-2013 1 0.6667 100
Test2 28-03-2013 03-04-2013 ... (1 Reply)
Discussion started by: gangaraju6
1 Replies
3. Shell Programming and Scripting
Hello out there,
file.txt:
comp51820_c1_seq1 42 N 0:0:0:0:0:0 1:0:0:0:0:0 0:0:0:0:0:0 3:0:0:0:0:0 0:0:0:0:0:0
comp51820_c1_seq1 43 N 0:0:0:0:0:0 0:1:0:0:0:0 0:0:0:0:0:0 0:3:0:0:0:0 0:0:0:0:0:0
comp51820_c1_seq1 44 N 0:0:4:0:3:1 0:0:1:9:0:0 10:0:0:0:0:0 0:3:3:2:2:6 2:2:2:5:60:3... (16 Replies)
Discussion started by: pathunkathunk
16 Replies
4. Shell Programming and Scripting
I have the input file in attached.
I want the output file :
Date , Time , Max_Bearer
11/01/2013 , 23:00 , 1447.894167
11/02/2013 , 00:00 , 1429.266667
11/03/2013 , 00:00 , 712.3175
11/04/2013 , 22:00 , 650.9533333
11/05/2013 , 23:00 , 665.9558333
11/06/2013 , 23:00 , 659.8616667... (2 Replies)
Discussion started by: justbow
2 Replies
5. Shell Programming and Scripting
I basically have a file where I had to do a bunch of greps to get a list of numbers
example: a file called numbers.txt
10000
10000
superman
10000
batman
10000
10000
grep '100' * |
10000
10000
10000
10000
10000 (2 Replies)
Discussion started by: zerofire123
2 Replies
6. Shell Programming and Scripting
cat *.out |grep "<some text>" | awk '{print $6}'
For ex,This will reutrn me
11111
22222
is it possible to add these two numbers in the above given command itself?I can write this to a file and find the sum.
But I prefer to this calculation in the above given line itself.
Any... (3 Replies)
Discussion started by: prasperl
3 Replies
7. Shell Programming and Scripting
Hi, my requirement is to sum values in a row.
eg:
input is: sum,value1,value2,value3,.....,value N
Required Output: sum,<summation of N values>
Please help me... (5 Replies)
Discussion started by: MrGopal666
5 Replies
8. UNIX for Dummies Questions & Answers
Hi All,
I have some numbers in two different files
file1
4.21927E+00 4.68257E+00 5.56871E+00 3.59490E+01 7.65806E+01 1.39827E+02
and
file2
5.61142E+00 6.21648E+00 7.40152E+00 4.41917E+01 8.31586E+01 1.42938E+02
I would like to get file3
which contains in each column the sum of the... (6 Replies)
Discussion started by: f_o_555
6 Replies
9. Shell Programming and Scripting
hello im looking for short way to sum numbers from stdout the way i found to do it is to long for me i wander if there is shorter way to do it
ok it 2 stage action
this will make the list of number in to file sum.txt
grep -c include *.c | awk '{l=split($0,a,":");print a;}' > sum.txt
this... (1 Reply)
Discussion started by: umen
1 Replies
10. Shell Programming and Scripting
Hi,
i want to sum all nubers in one column. Example:
12.23
11
23.01
3544.01
I'm trying to do this in awk, but it doesn't work properly.
Seems like awk is summing only integers, for example:
12
11
23
3544
It cuts off numbers after dot.
I used this command:
akw /text/ file.txt |nawk... (1 Reply)
Discussion started by: iahveh
1 Replies