Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@arodbits
Created September 22, 2017 15:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arodbits/4eb3facc0d2ed27c85c307975ed8a5dd to your computer and use it in GitHub Desktop.
Save arodbits/4eb3facc0d2ed27c85c307975ed8a5dd to your computer and use it in GitHub Desktop.
copy files from a list of files
#!/bin/sh
# list_of_useful_files.txt contains a list of files as follows.
# example1.csv\n
# example2.csv\n
# example3.csv\n
# the scrip reads the list of files and proceeds to copy them into the specified directory.
cat ~/Downloads/IPEDs/list_of_useful_files.txt | awk -F'/' '{print "cp "$0 " ~/Downloads/IPEDs/files_downloaded/"$7"-"$8 }' | sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment