【问题标题】:tre agrep via gnuwin32 - newb getting no output from tre agreptre agrep 通过 gnuwin32 - newb 没有从 tre agrep 获得输出
【发布时间】:2014-10-03 00:17:36
【问题描述】:

诚然,我之前没有在 *nix 上使用过 agrep,所以这可能只是我的一个新错误,但与其启动 *nix 盒子并在那里玩,我想我可以先问问这里的聪明人。

我在我的 Windows 机器上通过 gnuwin32 安装了 tre agrep - 二进制文件似乎正在工作 - 我得到了一些帮助输出和错误输出,但我似乎无法获得任何有意义的匹配输出。

我的测试文件:testing.txt

testing customer
random client name
super
super pty ltd
testing trust
testing

我唯一一次得到任何类型的输出是使用这一行:

agrep.exe "^" .\testing.txt

输出:

ÿþt

“测试”的其他简单测试没有给我任何输出:

agrep.exe "testing" .\testing.txt

谁能告诉我我做错了什么,或者更具体地说,如何做对? :)

谢谢!

【问题讨论】:

    标签: windows gnuwin32 agrep


    【解决方案1】:

    您有一个 Agrep 无法处理的 BOM 前缀 unicode 文本文件。把文件编码改成ansi或者试试

    type .\testing.txt | agrep "^"
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-06-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-01-08
      相关资源
      最近更新 更多