通过Applescript运行的Grep忽略参数

时间:2019-02-05 16:55:09

标签: terminal grep applescript

我的问题是,我正在尝试使用grep和Terminal在文本文件中快速搜索结果。命令

grep -F http://myurl.com/whatever urldocument.txt

根据需要返回带有URL的行。令人沮丧的是,使用Applescript获得结果

tell application "Terminal"
    do shell script "grep -F http://myurl.com/whatever urldocument.txt"
end tell

会中断,因为在运行Applescript时,grep由于某些原因会忽略(某些?)命令,特别是-F部分。我的问题是:为什么会这样,我能做些什么?

0 个答案:

没有答案