3 # a break out of the popular replace_pattern_in_file function that
4 # can work with multiple files.
6 source "$FEISTY_MEOW_SCRIPTS/core/functions.sh"
9 replacement="$1"; shift
11 if [ -z "$1" -o -z "$pattern" -o -z "$replacement" ]; then
12 echo This script requires a simple pattern to search for in a set of files,
13 echo the replacement for the pattern, and a list of files.
17 # loop across the file names we were given.
21 if [ -z "$patt1" ]; then
25 for currfile in $patt1; do
26 replace_pattern_in_file "$currfile" "$pattern" "$replacement"