Entering edit mode
2.9 years ago
michael.flower.14
▴
200
I've got a file that contains a list of file paths. I'd like to apply basename to the contents of the file.
File contents look like this:
ftp://ftp.sra.ebi.ac.uk/vol1/run/ERR323/ERR3239280/NA07037.final.cram
ftp://ftp.sra.ebi.ac.uk/vol1/run/ERR323/ERR3239286/NA11829.final.cram
ftp://ftp.sra.ebi.ac.uk/vol1/run/ERR323/ERR3239293/NA11918.final.cram
ftp://ftp.sra.ebi.ac.uk/vol1/run/ERR323/ERR3239298/NA11994.final.cram
And I'd like to do something like this:
cat cram_download_list.txt | basename
To obtain something like this:
NA07037.final.cram
NA11829.final.cram
NA11918.final.cram
NA11994.final.cram