添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
If you talk about the classic stream editor sed and option -r that enables extended regex, then this can be done in MAC with sed -E . Is this you talk about or i lost you? George Vasiliou Apr 29 '17 at 14:17 yes, thats exactly what i meant. but i need to change it in the makefiles of the rom i am compiling. and i cant find wehre the sed -r is used. thank you for your answer. flo071 Apr 30 '17 at 17:04 Welcome. You can just substitute all instances referring to sed -r with sed -E since it is the same thing. sed -E will work on mac and all other distros with no problem. George Vasiliou Apr 30 '17 at 19:25 thank you!! but do you know which makefile in the build directory of an android source the sed -r is used? because i cant find it. flo071 Apr 30 '17 at 23:06 Did you try something like grep -r 'sed -r' /android/dir/* ? This will scan all the files in a directory for sed -r. Or you can just grep 'sed -r' file to search in a particular file George Vasiliou Apr 30 '17 at 23:12 If you want to use sed instead of gsed the --with-default-names option does not work any more. Instead you have to add gnu-sed to the path: export PATH="/usr/local/opt/gnu-sed/libexec/gnubin:$PATH" dominik May 16 '19 at 11:09

Editing PATH manually is one way. However, this is an alternative solution that might work for some.

Most of the developers these days have conda . conda can install the latest sed and make it visible via $PATH

conda install -c conda-forge sed

conda takes care of editing PATH variable

Most believe conda is a package manager for python, but that is not entirely true. I install everything using conda. And it manages environment variables such as PATH really well. https://superuser.com/a/1304148/266871

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question . Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers .

site design / logo © 2020 Stack Exchange Inc; user contributions licensed under cc by-sa 4.0 with attribution required . rev 2020.3.4.36186