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/sh | |
# Some things taken from here | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# Set the colours you can use | |
black='\033[0;30m' | |
white='\033[0;37m' | |
red='\033[0;31m' | |
green='\033[0;32m' |
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
# Commands to replace a string in all scripts on a flat directory (no depth or recursion) | |
# Made for annoying Solaris box. Use sed -i on Linux (GNU sed) instead | |
# Backup scripts | |
find . -type f -exec cp {} ../scripts_bak/ \; -o -name . -o -prune | |
# Action 1 | |
# Replace user1 by user2 email. | |
# check matches user1 | |
find . -type f -exec grep -n "[email protected]" {} \; -o -name . -o -prune | wc -l |