Skip to content

Instantly share code, notes, and snippets.

@nkrumm
Created August 28, 2014 17:13
Show Gist options
  • Select an option

  • Save nkrumm/257865897c295ccf5452 to your computer and use it in GitHub Desktop.

Select an option

Save nkrumm/257865897c295ccf5452 to your computer and use it in GitHub Desktop.
Listing files in an FTP directory
#!/bin/bash
#As an example, get all ".fa.gz" files from a directory
wget -r -np --spider ftp://ftp.ncbi.nlm.nih.gov/genomes/Sus_scrofa/CHR* 2>&1 | grep -Eo "ftp\:.*\.fa\.gz" | uniq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment