Commit ffe631f5 authored by hadi.atteh's avatar hadi.atteh

tested adding comments to first file

parent 6c5a6957
#!/bin/bash #!/bin/bash
# input arguments
oldword=$1 oldword=$1
newword=$2 newword=$2
extension=$3 extension=$3
# find files that have the desired extension
files=$(find . -type f -name "*.$extension") files=$(find . -type f -name "*.$extension")
# loop over the fiels and switch the old word with the new word
for file in $files; do for file in $files; do
sed -i "s/$oldword/$newword/g" "$file" sed -i "s/$oldword/$newword/g" "$file"
done done
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