Skip to content

Instantly share code, notes, and snippets.

@jananiravi
Created April 6, 2020 16:01
Show Gist options
  • Save jananiravi/4e7358fa44e95e61a20e14fb66d5363c to your computer and use it in GitHub Desktop.
Save jananiravi/4e7358fa44e95e61a20e14fb66d5363c to your computer and use it in GitHub Desktop.
#!/bin/bash
# To rename files in bulk
# e.g., renaming `fasta` to `fa` | ABC.fasta XYZ.fasta to ABC.fa XYZ.fa
# ref: https://ryanstutorials.net/linuxtutorial/bonus.php#xargs
basename -s .fasta -a *.fasta | xargs -n1 -i mv {}.fasta {}.fa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment