notes/Remove Numbers on Lines that dont match strings-kjZe7N3T.sh
#!/bin/bash


if [ $# -lt 1 ]
then
  echo "Usage: $0 <file_name>"
  echo "Example: $0 file.txt"
  exit
fi

cat $1|while read line
do
  l="$(echo $line|tr '[:upper:]' '[:lower:]')"
  if [[ $l == *"hello"* ]] || [[ $l == *"brother"* ]]
  then
    echo "$line"
  else
    echo "$line"|sed 's/[0-9]/X/g'
  fi
done

syntax highlighted by Code2HTML, v. 0.9.1