Based on my understanding, the .
means current folder where the shell script is executed. And you can replace it with some other path.
Second, find
will go through all subdirectories recursively by default.
And if you want don’t want find
to go into the subdirectory, you can use -maxdepth
to limit the maximum depth that find
will go.
find . -maxdepth 1 -name '*.md' | xargs -r sed -i '' "s/$ORIG/$REPL/g"