Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement