## Find the minimum number

Find the minimum number
# 1
09-16-2009
Find the minimum number

Input
Output1
Output2
First I would like to take the difference of the 1st column and second column and print as 3rd column (10-8=2) and same follows to the 3&4, 5&6, 7&8 columns.
I assume this is the code that can print the output1
Second I would like to compare the values (the new columns like 3rd(the value of \$1-\$2) and 6th(\$3-\$4),9(\$5-\$6)th and 12th (\$7-\$8)) of the 4 fields (2 \t 12 \t 1 \t 11) and print the the set with minimum difference

For example the first minimum value in 1st row is 1 (i.e.10-9). So it has to be in output2 and second minimum value in 2nd row is -20 (20-40). So it has to be in output2.

I think I explained little bit broadly to understand easily.

Thanx

---------- Post updated at 10:34 PM ---------- Previous update was at 07:27 PM ----------

I solved it Thanx
This is for output1
This is for output2

Last edited by repinementer; 09-16-2009 at 04:44 AM..
 repinementer View Public Profile for repinementer Find all posts by repinementer

Test Your Knowledge in Computers #985
Difficulty: Medium
386BSD and FreeBSD were both derived from BSD releases.
True or False?

## Find minimum and maximum values based on column with associative array

Hello, I need to find out the minimum and maximum values based on specific column, and then print out the entire row with the max value. Infile.txt: scf6 290173 290416 . + X_047241 T_00113118-1 scf6 290491 290957 . + X_047241 T_00113118-2 scf6 290898 290957 . + X_047241 T_00113119-3 scf6...

## Absolute minimum value of a number using awk

Hi, I have got a file in the following format: 4300 23695 4305 03591 4400 125368 I need to sort this file to find the minimum absolute value of the numbers starting from 6th pos, so the expected output is:- 4300 23569 4305 01359 4400 123568 I tried to cut out the file from 6th...

## Python: find the minimum in all rows

I am using Biopython to process an alignment in fasta format. I need to slice the sequences where there is the first stop codon. So I divided my alignment in codons and found the stop. I then found the first codon position using enumerate(). But I found the minimum for each row. However I need to...

## How to find a minimum value of a row?

input 1 2 3 4 5 2 8 2 1 1 1 4 2 1 5 4 4 4 2 1 3 2 2 6 7 4 5 4 5 5 5 4 3 3 5 I woud like to print a min of each row such that my output would look like 1 1 1 2 3

## In a row, replace negative sign and find minimum value among four columns

Hi Friends, I have an input file like this chr1 100 200 1 2 3 4 chr1 150 200 4 5 6 7 chr2 300 400 9 6 7 1 chr2 300 410 -10 21 -11 13 chr3 700 900 -21 -22 130 165 Now, my output file is chr1 100 200 1 chr1 150 200 4 chr2 300 400 1 chr2 300 410 10 chr3 700 900 21 Remove...

## Find minimum value different from zero

Hello, I have this file file1.csv Element1;23-10-2012;1,450;1,564;1,428 Element2;23-10-2012;1,448;1,565;1,427 Element3;23-10-2012;1,453;1,570;1,424 Element4;23-10-2012;1,428;1,542;1,405 Element5;23-10-2012;1,461;;1,453 Element6;23-10-2012;1,438;1,555;1,417...

## grep - match files containing minimum number of pattern matches

I want to search a bunch of files and list only those containing a minimum number of pattern matches. So if I want to identify files containing 3 (or more) instances of the pattern "said:" and I have file1 that contains the lines: He said: She said: and file2 that contains the lines: He...

## Find the minimum value

Hi there I have generated a column containing 100.000 values. Sample: 94.971 101.468 73.120 100.601 102.329 I need to find the minimum value in this file and I must know which row it is in (no sorting). I hope you can help! Thanks!

## What is the minimum number of partitions you need to install Linux?

I think its 3. Just to know if I am correct. / /boot swap :confused:

## minimum number of unique key

input a 1 a 2 a -1 b 1 b 2 b 3 output a -1 b 1 Thanx ---------- Post updated at 09:42 PM ---------- Previous update was at 09:10 PM ---------- Ok I managed it