永久屏蔽警告:grep: warning: GREP_OPTIONS is deprecated; please use an alias or script
临时方法:
unset GREP_OPTIONS
永久方法:
编辑~/.bashrc文件
vim ~/.bashrc
注释掉如下语句
export GREP_OPTIONS="--color=auto" GREP_COLOR="1;31"
保存退出后就不会再出现这个警告了,但是你会发现,grep没有高亮颜色了。所以,在这句话后面再加两行(注意缩进):
alias grep='grep --color=always -i'export GREP_COLOR="1;31"
修改后的colorize grep完整代码段如下:
# Colorize grepif echo hello|grep --color=auto l >/dev/null 2>&1; then# export GREP_OPTIONS="--color=auto" GREP_COLOR="1;31"alias grep='grep --color=always -i'export GREP_COLOR="1;31"
fi
此时保存退出,下次再进入命令行时就不会再看见deprecated警告了,而且grep还是可以正常使用,并且有高亮显示的。
永久屏蔽警告:grep: warning: GREP_OPTIONS is deprecated; please use an alias or script相关推荐
- 解决:WARNING: Hive-on-MR is deprecated in Hive 2 and may not be available in the future versions.
背景:hadoop2.7.4 hive2.3.6,可以成功启动,可以创建表结构,但是insert插入数据时一直卡在如下警告处,插入不成功,一直没解决. WARNING: Hive-on-MR is ...
- R语言使用tryCatch函数调试R代码实战:tryCatch函数运行正常R代码、tryCatch函数运行有错误(error)的R代码示例/tryCatch函数运行有警告(warning)的R代码示例
R语言使用tryCatch函数调试R代码实战:tryCatch函数运行正常R代码.tryCatch函数运行有错误(error)的R代码示例/tryCatch函数运行有警告(warning)的R代码示例 ...
- 解决这个警告⚠️:warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such file or directory...
⚠️ 在电脑上使用终端连接服务器的时候,经常会打印出如下警告: warning: setlocale: LC_CTYPE: cannot change locale (UTF-8): No such ...
- win10运行Git出现警告 :warning: LF will be replaced by CRLF in ...
win10运行Git出现警告 :warning: LF will be replaced by CRLF in ... 1. 错误状态 2. 解决办法 1. 错误状态 win10环境下,在使用Git的 ...
- 警告 1 warning C4996: ‘scanf‘: This function or variable may be unsafe.
警告 1 warning C4996: 'scanf': This function or variable may be unsafe. 下午教妹妹学习C语言的过程中使用scanf函数出现了一个警告 ...
- matlab 警告(warning)、错误(error)、异常(exception)与断言(assert)
0. 消息标识符(Message Identifiers) 消息标识符,是附加在 error 和 warning 语句上的一个标签,以被 matlab 做唯一性标识. warning 语句所支持的函数 ...
- WARNING: --master-data is deprecated and will be removed in a future version
Mysql 版本:/usr/local/mysql/bin/mysql Ver 8.0.26 for Linux on x86_64 (MySQL Community Server - GPL) 报错 ...
- pycharm跑代码时警告libpng warning: iCCP: known incorrect sRGB profile
pycharm跑代码时警告libpng warning: iCCP: known incorrect sRGB profile 这是由于自己下载的qq输入法导致的,程序规定按Q退出,但是可能无法识别Q ...
- Warning: findDOMNode is deprecated in StrictMode
Warning: findDOMNode is deprecated in StrictMode. findDOMNode was passed an instance of Transition w ...
最新文章
- 第三次作业---读《构造之法》1-5章有感
- Java数据库连接(JDBC)之二:Statement对象和PreparedStatement对象的使用
- head first java ( 16章 )
- Powershell管理系列(三十一)PowerShell操作之批量创建邮箱
- java isight zmf_isight集成catia和abaqus,nastran流程详解
- Leaflet笔记-把leaflet-tilelayer-wmts移植到vue cli中(含思路)
- Zookeeper C API 基本常量和结构体介绍
- python美化输出模块_python日志处理模块
- 救救孩子?强制实名游戏不足四成 青少年视力保护状况堪忧
- 8法则的挑战:长尾理论与长尾效应
- YonMaster开发者认证线上赋能培训班定档4月18日
- java将英文字符(无论大小写)转化为小写
- 关于Windows文件读写(提高读写速度)
- solidworks中开孔绘制螺纹孔
- LTE模三干扰的形成、影响和优化
- 主要的技术Blog网站
- 1恢复 群晖raid_群晖raid5数据恢复(一看就会的恢复软件)
- Android蓝牙技术+Demo
- program files与program files(x86)的区别
- js计算月所得税及年终奖所得税