Created
May 27, 2018 17:59
-
-
Save rjcorwin/f1c7b2063de9c1e33ddae09a11c81521 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #/bin/bash | |
| # First param is the string to match, second is the destination directory. | |
| ls -d -1 $PWD/* | sed 's/\ /\\\ /g' | sed 's/\*/\\\*/g' | sed 's/\#/\\\#/g' | sed "s/\'/\\\'/g" | grep $1 | xargs -I {} cp "{}" $2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment