Entering edit mode
4.3 years ago
xatabadich
•
0
Dear all,
I have an inputfile.txt which contains the following:
ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCF/000/248/415/GCF_000248415.2_ASM24841v2
ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCF/001/011/135/GCF_001011135.1_ASM101113v1
..
..
..
I used the command which purpose is to download genome assemblies from NCBI website
awk 'BEGIN{FS=OFS="/";filesuffix="genomic.fna.gz"}{ftpdir=$0;asm=$10;file=asm"_"filesuffix;print "wget "ftpdir,file}' inputfile.txt > outputfile.sh
The problem is that it generates a string with break lines like this:
wget ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCF/000/248/415/GCF_000248415.2_ASM24841v2
/GCF_000248415.2_ASM24841v2
_genomic.fna.gz
And I want it to be one line like this:
wget_ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCF/000/248/415/GCF_000248415.2_ASM24841v2/GCF_000248415.2_ASM24841v2_genomic.fna.gz
How can I achieve it?
Thanks!