【发布时间】:2021-02-17 17:13:56
【问题描述】:
假设我运行以下命令
echo "I love the west indies " | grep indies
因为上面的 grep 评估为真,因为会有一个实际匹配我想写“我爱西印度群岛”到文件
说我跑
echo "i love the west indies " | grep america
什么都没有写,因为这个 grep 命令什么都不返回。我如何在 bash 中做到这一点?
【问题讨论】:
标签: linux bash unix command-line grep