sed command creating unwanted duplicates of file with -e extension
On OSX sed (BSD) sed requires an extension after -i option. Since it is finding -e afterwards it is adding -e to each input filename. btw you don’t even need -e option here. You can pass an empty extension like this: sed -i ” ‘s/foo/bar/g’ $file Or use .bak for an extension to save original … Read more