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. 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
5. Shell Programming and Scripting
I have a file is created from standard output.
I have put a leading space to force the first line to collate low vis a vis the rest of the lines.
If I pass the entire file to the Linux sort, it ignores the leading space and the first line appears in somewhere in the list.
If I add lots of... (15 Replies)
Discussion started by: lsatenstein
15 Replies
6. 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
7. Shell Programming and Scripting
HI all
i have a text file file1 like this
004002004545454000001
041002004545222000002
006003008751525000003
007003008751352000004
006003008751142000005
004001005745745000006
i want to sort the file according to position 1-5 and secondary sort by
the last position of file 16-21... (4 Replies)
Discussion started by: naamas03
4 Replies
8. Shell Programming and Scripting
I need to sort input file as below to display as below:
input.txt
User: my_id
File: oracle/scripts/ssc/ssc_db_info
User: your_id
File: pkg_files/BWSwsrms/request
User: your_id
File: pkg_files/BWSwsco/checkConfig.sh
OUTPUT:
User: my_id
File: ... (3 Replies)
Discussion started by: tqlam
3 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