This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
Hello,
I have a table with 4 columns. I want it sorted with the 2nd column, then the 3rd column and write it into a new table. I have ~150 tables and I want to loop it to create it for all the tables.
Here is the command I am using:
awk 'print{ $
1, $2, $3}' Abscondita_terminalis_genome_final_protein.all.marker_genes_scores.table | sort | sort -k 2nr,2 | sort
-uk3,3 ; done > Abscondita_terminalis_genome_final.table
I tried looping it using this command:
for i in *.table; do awk 'print{ $1, $2, $3}' $i| sort | sort -k 2nr,2 | sort -uk3,3 ; done > ${i%_protein*}.table
What am I doing wrong and how can I rectify the loop?
Subreddit
Post Details
- Posted
- 1 year ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/linux4noobs...