Commit 4ec32ee5 authored by laila.alabdullah's avatar laila.alabdullah

add replace_old_new.sh

parent ffcb89d6
#!/bin/bash
#replace old word in the txt files with a new word
old=$1
new=$2
echo "Enter the directory that you want to be the starting point : "
read dir
cd $dir
find -name "*.txt" -exec sed -i "s/$old/$new/g" {} \;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment