51工具盒子

依楼听风雨
笑看云卷云舒,淡观潮起潮落

linux 脚本 排除 warning 信息(2>/dev/null) 定向到空

[root@Server2012 eres]# redis-cli -p 6479 -a root ping  | grep -c "PONG"
Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.
1

redis-cli -p 6479 -a root ping 2>/dev/null | grep -c "PONG"
赞(9)
未经允许不得转载:工具盒子 » linux 脚本 排除 warning 信息(2>/dev/null) 定向到空