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
#!/bin/bash | |
# Variables to define the string to find and the string to replace with | |
OLD_STRING="tenant" | |
NEW_STRING="domain" | |
# Find all directories recursively and rename them | |
find . -depth -type d -name "*${OLD_STRING}*" | while IFS= read -r dir; do | |
newdir=$(echo "$dir" | sed "s/${OLD_STRING}/${NEW_STRING}/g") | |
mv "$dir" "$newdir" |
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
import os | |
import math | |
import subprocess | |
import sys | |
import argparse | |
import re | |
from math import * | |
from os import * | |
from subprocess import * |
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
find path_to_folder -depth -exec rename -f 's/(.*)\/([^\/]*)/$1\/\L$2/' {} \; | |
gsutil -m cp -r /path_to_folder/* gs://bucket |
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
find ./src -type f -name "*.ex" -print0 | xargs -0 sed -i '' 's/something/another_stuff/g' |