Skip to content

Instantly share code, notes, and snippets.

@mathewpeterson
Created October 21, 2011 19:39
Show Gist options
  • Select an option

  • Save mathewpeterson/1304735 to your computer and use it in GitHub Desktop.

Select an option

Save mathewpeterson/1304735 to your computer and use it in GitHub Desktop.
Get files from folder a and copy them to folder b.
#!/bin/bash
SRC_PATH=''
DEST_PATH=''
FILES_LIST=`cat $1`
for file in $FILES_LIST
do
cd ${DEST_PATH} && cp -R ${SRC_PATH}/${file} ${file}
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment