Skip to content

Instantly share code, notes, and snippets.

#!/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'
# 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