sed multiple files 1

sed multiple files

for i in xa*; do
    sed -i 's/asd/dfg/g' $i
done

Here is what the above code is Doing:
1. It’s creating a list of all the files in the current directory that end with the extension .txt.
2. It’s looping through each file in that list.
3. It’s replacing the word “asd” with the word “dfg” in each file.

Similar Posts