10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi, I have some data I have taken from the internet in the following scheme:
name
direction
webpage
phone number
open hours
menu url
book url
name
...
Of course the only line that is mandatory is the name wich is the one I want to sort by.
I have the following sed & awk script that... (3 Replies)
Discussion started by: devmsv
3 Replies
2. Shell Programming and Scripting
I have to sort below output in text file in unix bash
20170308
DA,I,113
20170308
PM,I,123
20170308
DA,U,22
20170308
PM,U,123
20170309
DA,I,11
20170309
PM,I,23
20170309
DA,U,123
20170309
PM,U,233 (8 Replies)
Discussion started by: Adfire
8 Replies
3. Shell Programming and Scripting
I am using the below awk that results in the below output:
awk '{k=$1 OFS $2; s+=$4; c++} END{for(i in s) print i, s/c}' input.txt > output.txt output.txt
chr20:43625799-43625957 STK4:exon.6;STK4:exon.7 310.703
chr20:36770455-36770611 TGM2:exon.6;TGM2:exon.7 614.756... (5 Replies)
Discussion started by: cmccabe
5 Replies
4. UNIX for Dummies Questions & Answers
I am new to shell scripting. I am interested how to know how to sort a content of a file using shell scripting.
I've attached the 'Input file' and the 'expected output' to this thread.
Details provided in the expected output file will provide details on how the sort needs to be done.
... (16 Replies)
Discussion started by: nkarthik_mnnit
16 Replies
5. Shell Programming and Scripting
Dear all,
I am trying to sort a text file based on column 3, 10, 11 and 12. But certain column are blank for some lines. Column 3 has to be in ascending order after sorting.
Part of my input file is as follows:
CN727990 1 A01 4703 5083 73.28 - A_scaffold000011 4365605 4365985 73.28 +... (10 Replies)
Discussion started by: huiyee1
10 Replies
6. UNIX for Dummies Questions & Answers
Hello everyone!
As the heading reads, I would like to sort the lines of a text file, starting at a specific column (i.e. skip the first X characters of each line).
What I’m actually trying to sort is the md5 sums file of a directory. Every time I copy a new file to that directory, I perform... (3 Replies)
Discussion started by: iznogoud
3 Replies
7. Shell Programming and Scripting
Hello ,
i have a text file like this
1 a1 ,AB ,AC ;AD ,EE
2 a2 ,WE ;TR ,YT ,WW
3 a3 ;AS ,UY ;RF ,YT
i want to sort this text file based on each row , and excluding 2nd column from the sorting and not taking the comma or ; into consideration in the sorting, so it will become like this... (12 Replies)
Discussion started by: shelladdict
12 Replies
8. Shell Programming and Scripting
I now have a 230,000+ lines long text file formatted in segments like this:
Is there a way to sort this file to have everything in chronological order, based on the date and time in the text? In this example, I would like the result to be: (19 Replies)
Discussion started by: KidCactus
19 Replies
9. Shell Programming and Scripting
Hi,
I have a file of names and I want perl to do a sort on this file. How can I sort this list of names using perl? I'm thinking of a command like:
@sorted = sort { lc($a) cmp lc($b) } @not_sorted # alphabetical sort
The only thing I'm sort of unsure of is, how would I get the name in my... (6 Replies)
Discussion started by: eltinator
6 Replies
10. Shell Programming and Scripting
Ive got a file called listacdrs with this structure:
01/09/2006 12:13 p.m. 1.046.528 CF0155.DAT
01/09/2006 12:13 p.m. 1.046.528 CF0156.DAT
01/09/2006 12:13 p.m. 1.046.528 CF0157.DAT
01/09/2006 12:13 p.m. 1.046.528 CF0158.DAT
01/09/2006 12:14 p.m. ... (3 Replies)
Discussion started by: alexcol
3 Replies