10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a file (myfile.txt) with contents like this:
1.txt apple is
3.txt apple is
5.txt apple is
2.txt apple is a
7.txt apple is a
8.txt apple is a fruit
4.txt orange not a fruit
6.txt zero isThe above file is already sorted using this command:
sort -k2 myfile.txtMy objective is to get... (3 Replies)
Discussion started by: shoaibjameel123
3 Replies
2. Shell Programming and Scripting
Hi,
I have a table to be imported for R as matrix or data.frame but I first need to edit it because I've got several lines with the same identifier (1st column), so I want to sum the each column (2nd -nth) of each identifier (1st column)
The input is for example, after sorted:
K00001 1 1 4 3... (8 Replies)
Discussion started by: sargotrons
8 Replies
3. Shell Programming and Scripting
Hi
cat /tmp/xx.txt
1 4
1 5
1 6
2 1
2 1
2 1
i want to add the values of 2nd column resepect to 1st column values..for 1 in 1st column i need sum of all the values in 2nd column ..pls tell me hw to do it?? (8 Replies)
Discussion started by: Aditya.Gurgaon
8 Replies
4. Shell Programming and Scripting
Hi All,
I have a file with data as below:
A,FILE1_MYFILE_20130309_1038,80,25.60
B,FILE1_MYFILE_20130309_1038,24290,18543.38
C,FILE1_dsc_dlk_MYFILE_20130309_1038,3,10.10
A,FILE2_MYFILE_20130310_1039,85,110.10
B,FILE2_MYFILE_20130310_1039,10,12.10... (10 Replies)
Discussion started by: angshuman
10 Replies
5. Shell Programming and Scripting
Hi,
I am having a file in the following format.
for aaaa
1111 1234
2222 3434
for bbbb
1111 3434.343
2222 2343
for cccc
3333 2343.343
4444 89000
for dddd
1111 5678.343
2222 890.3
aaaa 2343.343
bbbb 34343.343 (5 Replies)
Discussion started by: jpkumar10
5 Replies
6. UNIX for Dummies Questions & Answers
Dear all,
I need your help for my question please
I have without header (space separated) and need to add two colomns at the beginning with values
my file look like :
rs1 a t 0.6
rs2 a c 0.3
rs3 t g 0.8
I need to a new file like:
1 100 rs1 a t 0.6
1 100 rs2 a c 0.3
1 100 rs3 t g... (3 Replies)
Discussion started by: biopsy
3 Replies
7. Shell Programming and Scripting
Hello
I have file that consist of 2 columns of millions of entries
timestamp and throughput
I want to find the average (throughput ) for each equal timestamp before change it to proper format
e.g : i want to average 2 coloumnd fot all 1308154800 values in column 1
and then
print... (4 Replies)
Discussion started by: aadel
4 Replies
8. Shell Programming and Scripting
Hi,
I have a file "input.txt" with the following content :
5312,0,,,1,8,141.2,20090727
3714,0,,,1,8,285.87,20090727
5426,0,,,1,8,3.9,20090727
3871,0,,,1,8,30.4,20090727
9071,0,,,1,8,146.2,20090727
5141,0,,,1,8,2.8,20090727
0460,0,,,1,8,-0.1,20090727
7918,0,,,1,8,-0.1,20090727... (3 Replies)
Discussion started by: valokv
3 Replies
9. Shell Programming and Scripting
Dear Guyz:)
I have 2 different input files like this. I would like to pick the values or letters from the inputfile2 based on inputfile1 keys (A,F,N,X,Z).
I have done similar task by using awk but in that case the inputfiles are similar like in inputfile2 (all keys in 1st column and values in... (16 Replies)
Discussion started by: repinementer
16 Replies
10. Shell Programming and Scripting
Dear all,
Does anyone know how I could to add a column of numbers (1s, or 2s, or..., or 6s) to two-column text files (tab-delimited), where the specific number to be added varies as a function of the file naming?
Currently, each of my text files has two columns, so the column with the... (12 Replies)
Discussion started by: rlapate
12 Replies