10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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... (2 Replies)
Discussion started by: yifangt
2 Replies
2. Shell Programming and Scripting
Hi All
I hope that someone could help me!
I have an input file like this, with 4 colum(ID, feature1, start, end):
a x 1 5
b x 3 10
b x 4 9
b x 5 16
c x 5 9
c x 4 8
And my output file should be like this:
a x 1 5
b x 3 16
c x 4 9
What I would like to do is to output for each ID... (2 Replies)
Discussion started by: giuliangiuseppe
2 Replies
3. Shell Programming and Scripting
Hello,
I have files as follows:
ACTGCCCTG
ACCGGCTCC
ACAAATTTC
ACCCGGGTTI want to do the following:
I want to find certain strings in each line, for example CT and TT. Then I want the script to give me the number of the characters before my string, for example, 6 for the first line, 5 for... (4 Replies)
Discussion started by: Homa
4 Replies
4. Shell Programming and Scripting
Can I print the minimum and maximum values of values in first 4 columns ?
input
3038669 3038743 3037800 3038400 m101c
3218627 3218709 3217600 3219800 m290
.............
output
3037800 3038743 m101c
3217600 3219800 m290 (2 Replies)
Discussion started by: quincyjones
2 Replies
5. Shell Programming and Scripting
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... (6 Replies)
Discussion started by: saba01
6 Replies
6. UNIX for Dummies Questions & Answers
I am on Ubuntu 11.10 using bash.
I want to perform some numeric computations and have the following options:
# Setting verbosity levels
none=0; low=1; medium=2; high=3; debug=4
(( vbLevel=medium ))
if (( vbLevel > low )); then
echo "Test 1, $vbLevel"
fi
vbLevel=$medium
if ];... (3 Replies)
Discussion started by: kristinu
3 Replies
7. Shell Programming and Scripting
hey,
I have text file which has some data for some device Id's. i want to perform AVG, MAX,2nd MAX on these device ids. The .txt file looks like below. please help me in finding the computations per Device id. My output file should contatin with DeviceID,Avg, max and 2nd max of the device ID.... (8 Replies)
Discussion started by: mahi_mayu069
8 Replies
8. UNIX for Dummies Questions & Answers
Hi.
I would like to ask for helps on extracting a minimum values among three columns using gawk in tab separator.
input file:
as1 10 20 30
as2 22 21 23
as3 300 391 567
as4 19 20 15
Output file:
as1 10
as2 21
as3 300
as4 15
I am extremely appreciate your helps and comments.... (2 Replies)
Discussion started by: Amanda Low
2 Replies
9. Programming
Hello there.
I've got the query like that
SELECT count(tour_id) AS cnt
FROM orders
JOIN tours
ON orders.tour_id=tours.id
GROUP BY tour_id
The result Is
cnt
1
4
2
1
1
Now i have to select all records with minimum values in field "cnt"
MySQL function min() returns only one.... (2 Replies)
Discussion started by: Trump
2 Replies
10. Shell Programming and Scripting
Hello folks,
I have data collected in every 3 hours. But, I would like to expand this to 1 hour interval by equally dividing with next row.
For example, I want to keep the first value 1987-01-01-00z 2.0, but following all record should be re-written as follow.
1987-01-01-03z 5.0 becomes... (11 Replies)
Discussion started by: Jae
11 Replies