Created
July 15, 2021 02:31
-
-
Save lcmartinezdev/8e64d6ca7441ded8a89058acd25f412e to your computer and use it in GitHub Desktop.
Search all .env and save in one folder
This file contains 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
folder="envs" | |
find . -name "*.env" | while read line; do | |
new_file=$(echo $line | sed 's/\//-/g' | sed 's/\.-//g' | sed 's/-\./\./g') | |
echo "Copying '$line' to '$folder/$new_file'" | |
cp -- "$line" "$folder/$new_file" | |
done; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In local I copy all the .env files to Google Drive.
folder=~/Google\ Drive/envs