Created
April 18, 2018 20:27
-
-
Save rad4day/afe6eea666d21a80a01fed43d2ce33e5 to your computer and use it in GitHub Desktop.
Linux magic
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 | |
# Create folders | |
find src -type f -iname "*[^(.java)]" | sed -E "s/^src/resources/g" | rev | cut -d"/" -f2- | rev | uniq | xargs -n1 mkdir -p | |
# mv files | |
for i in $(find src -type f -iname "*[^(.java)]"); do mv $i $(echo $i | sed -E "s/^src/resources/g"); done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment