0

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

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

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

4

0 回答 0