[Solved] 'sed: illegal option -- r usage' error in Visual Studio Code | Mac
Article
Mohit Mozumder
Problem:
I updated my visual studio Application on my mac but when I am trying to run a command i got an error in every command-
sed: illegal option -- r
usage: sed script [-Ealn] [-i extension] [file ...]
sed [-Ealn] [-i extension] [-e script] ... [-f script_file] ... [file ...]
Solution:
Until VS Code Solve this issue you can try this solution-
First Install gsed
brew install gnu-sed
Then make a symbolic link to gsedcd /usr/local/bin
ln -s gsed sed
When VSCode fixes the issue just delete the symbolic link, and uninstall gsed.
Note: This solution is only for mac users
Thank you for reading the article. If you face any other problem feel free to ask us.