10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
data file contains
failed=24
error=23
error=163
failed=36
error=903
i need to get a total count of each value above. i'm looking for the most efficient method to do this as the datafile i provided is just a sample. the actual data can be several hundred thousands of lines.
so from... (3 Replies)
Discussion started by: SkySmart
3 Replies
2. Shell Programming and Scripting
I have files :
cat file1
15
88
44
667
33
4cat file2
445 66 77 3 56 (12 Replies)
Discussion started by: Natalie
12 Replies
3. Shell Programming and Scripting
Hi,
I have 3 to 4 different files, from that i need to take a Average of numbers from a particular column. here i have to take 4th column,
that should present in diff. file.
File 1:
Col1 col2 col3 col4
1 11 sa 12.00
2 22 sb 134.59
3 33 sc 11.99
4 44 sd 12.44
Col1 col2 col3... (8 Replies)
Discussion started by: Shenbaga.d
8 Replies
4. Shell Programming and Scripting
I have two files
hhhh 3674.00
a 75 1535 183 2134 291 2452 442 2738 704 3048
a 1007 3549 1282 4413 1494 5001 1631 5217 1954 5610
a 2540 5832 3248 6080 3629 6264 4851 6600 7004 6985
... (4 Replies)
Discussion started by: Indra2011
4 Replies
5. Shell Programming and Scripting
Hi All,
I have tried few things with this but it did not help much.
I have some 200,000 files in a directory. There are two sets of files.
1. Files with extension .dat with file names like these (1.dat, 2.dat, 5.dat, 8.dat....200000.dat)
2. Another set of files with .txt extension and... (5 Replies)
Discussion started by: shoaibjameel123
5 Replies
6. Shell Programming and Scripting
Hi all,
Looking for suggestions on a better way to sum numbers in a key value pair formated file. What I have works but seems really clunky to me. Any suggestions would be greatly appreciated.
cat test.txt | perl -ne 'm/(M=)(\d+\.?\d?\d?)/ && print "$2\n"' | awk '{ sum+=$1} END {printf... (7 Replies)
Discussion started by: cgol
7 Replies
7. Shell Programming and Scripting
Hi All,
I need to print the sum of numbers from different files.
Input files:
file1.out
10
20
30
file2.out
10
20
30 (5 Replies)
Discussion started by: saint2006
5 Replies
8. Shell Programming and Scripting
Hey,
I am gettin a bit crazy with my script. I have several input datas with the same name (5.ill) in different folders (daysim_01, daysim_02, etc.). The 4. column of each of the data has to be summed with each other and then hass to be written in one new file.
So file1:
1 1 0 1
2 1 1 2 ... (7 Replies)
Discussion started by: ergy1983
7 Replies
9. UNIX for Dummies Questions & Answers
here i have two files:
file 1
1
2
3
4
5
5
6
7
8
9
file 2
4
5
6
6
8
8 (6 Replies)
Discussion started by: i.scientist
6 Replies
10. Shell Programming and Scripting
I want to change a number in a file into number -1..
for instance
file_input is
fdisdlf_s35
fdjsk_s27
fsdf_s42
jkljllljkkl_s57
... etc
now i want the output to be
fdisdlf_s34
fdjsk_s26
fdsf_s41
jkljllljkkl_s56
... etc
I was think of using "sed -e 's/2/1/g' -e 's/3/2/g' -e... (4 Replies)
Discussion started by: bigboizvince
4 Replies