mac 上sed
mac上sed和liunx是不一样的,所以有些指令可能不通用,需要将mac上sed替换成gun的;
Install Homebrew
First, visit Homebrew homepage and follow the installation instructions to install Homebrew.
Shortcut: install the latest XCode and then run the following command to install:
1. /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Then add the following line to your .bashrc or .zshrc:
2. export PATH="$(brew --prefix coreutils)/libexec/gnubin:/usr/local/bin:$PATH"
Install the GNU Command Line Tools
First comes the most important one — GNU Coreutils:
3. brew install coreutils
GNU Coreutils contains the most essential UNIX commands, such as ls, cat.
Then you may probably want to install the following ones (For some of the packages, you need to run brew tap homebrew/dupes first, but only once for your system):
brew install binutils
brew install diffutils
brew install ed --with-default-names
brew install findutils --with-default-names
brew install gawk
brew install gnu-indent --with-default-names
4. brew install gnu-sed --with-default-names
brew install gnu-tar --with-default-names
brew install gnu-which --with-default-names
brew install gnutls
brew install grep --with-default-names
brew install gzip
brew install screen
brew install watch
brew install wdiff --with-gettext
brew install wget
下面是mac已经默认安装,想要替换成最新版本的可以自己去安装
brew install bash
brew install emacs
brew install gdb # gdb requires further actions to make it work. See `brew info gdb`.
brew install gpatch
brew install less
brew install m4
brew install make
brew install nano
你也许需要下面的安装。
brew install git
brew install openssh
brew install perl
brew install python
brew install rsync
brew install svn
brew install unzip
brew install vim --override-system-vi
brew install macvim --override-system-vim --custom-system-icons
brew install zsh
mac 上sed的更多相关文章
- mac上sed -i 执行失败报错
比如说我要替换version.txt文件中的version=1.1 为version=1.2,比如test.txt文件内容如下: version=1.1 此时我们会使用sed来替换,如果是涉及比较多的 ...
- mac上执行sed的编辑 -i命令报错sed: 1: "test.txt": undefined label ‘est.txt’或sed: 1: "2a\test\": extra characters after \ at the end of a command
问题一 sed编辑命令:[sed -i 's/a/b/g' test.txt] 报错:sed: 1: "test.txt": undefined label 'est.txt' ...
- 在 Mac 上使用 `sed` 命令的几个坑
不可忽略的备份格式 sed -i 's/hello/world/g' hello.text 上面这行代码,可以在 linux 上运行,作用是将找到的 hello 替换为 world,并且直接保存修改到 ...
- 解决Mac下sed命令报错的问题
在Mac上准备批量替换一些文字,使用sed命令,如下: sed -i 's/xxx/yyy/g' file 同样的命令在Linux上是可以成功运行的,注意Mac下man sed中-i参数的说明: 原来 ...
- Mac上通过docker配置PHP开发环境
这篇文章介绍的内容是关于Mac上通过docker配置PHP开发环境,有着一定的参考价值,现在分享给大家,有需要的朋友可以参考一下 更多PHP相关知识请关注我的专栏PHPzhuanlan.zhihu. ...
- Mac上MySQL忘记root密码且没有权限的处理办法&workbench的一些tips (转)
忘记Root密码肿么办 Mac上安装MySQL就不多说了,去mysql的官网上下载最新的mysql包以及workbench,先安装哪个影响都不大.如果你是第一次安装,在mysql安装完成之后,会弹出来 ...
- 让 asp.net 在 mac 上飞
.NET 不跨平台一直饱受争议,虽然微软前端时间放出些消息,要支持.NET跨平台的发展,但是微软一直坚持着不主动.不拒绝.不负责的三不态度,仍然用一种软件帝国的心态,折腾着一些毫无新意的东西.微软想要 ...
- Mono 4.0 Mac上运行asp.net mvc 5.2.3
Mono 4.0 已经发布,二进制包已经准备好,具体的发布说明参见:http://www.mono-project.com/docs/about-mono/releases/4.0.0/. 今天在Ma ...
- 剖析并利用Visual Studio Code在Mac上编译、调试c#程序
0x00 前言 一周多以前的微软的Build大会上,微软发布了一个让很多人眼前一亮的工具,也是本文的主角——Visual Studio Code.很多使用Windows的朋友都很高兴,认为又多了一个很 ...
随机推荐
- python常用模块之xml模块
python常用模块之xml模块 xml是实现不同语言或程序之间进行数据交换的协议,跟json差不多,但json使用起来更简单,不过,在json还没诞生的年代,大家都是使用xml,目前很多传统公司的系 ...
- phpcms sitemaps修改
phpcms\modules\admin\templates\googlesitemap.tpl.php 修改selected到天和将20的生成数量改为大的数值,可以更快的操作
- erlang开发环境配置
第一步 从源码安装erlang git clone https://github.com/erlang/otp 目前最新版本为17.X cd otp/ ./configer 检查编译环境 sudo ...
- sudo 运行 npm或node时,出现找不到命令
sudo 运行 npm或node时,出现找不到命令的情况,运行下面这些命令, sudo ln -s /usr/local/bin/node /usr/bin/node sudo ln -s /usr/ ...
- erl_0017 《硝烟中的erlang》 读书笔记004 “锁和阻塞”
如果某个进程需要持续地接收新任务,那么其在执行耗时过长的锁或者阻塞操作时,就会出现问题. 最为常见的例子之一就是:某个进程使用了TCP socket,阻塞在了接收新的连接或者等待消息上面.在执行此类阻 ...
- DML操纵语句
--在新增数据的时候,如果在表名之后没有跟 列名,那么values()必须写全--顺序必须不能改变,这个顺序就是表中列的顺序insert into dept values(70,'20','哈哈') ...
- POJ3045 Cow Acrobats
题意 Farmer John's N (1 <= N <= 50,000) cows (numbered 1..N) are planning to run away and join t ...
- 记录一些WPF常用样式方便以后复用(二)(Button、CheckBox、输入账号密码框)(转)
Button (一) <Style x:Key="ButtonSaveStyle" TargetType="{x:Type Button}"> &l ...
- lapis 路由
1. 路由以及url 模式 参考如下: local lapis = require("lapis") local app = lapis.Application() app:mat ...
- 11.Python使用Scrapy爬虫小Demo(新手入门)
1.前提:已安装好scrapy,且已新建好项目,编写小Demo去获取美剧天堂的电影标题名 2.在项目中创建一个python文件 3.代码如下所示: import scrapy class movies ...