我是 AWK 编程的新手,我想知道如何过滤以下文本:
Goedel - Declarative language for AI, based on many-sorted logic. Strongly
typed, polymorphic, declarative, with a module system. Supports bignums
and sets. "The Goedel Programming Language", P. M. Hill et al, MIT Press
1994, ISBN 0-262-08229-2. Goedel 1.4 - partial implementation in SICStus
Prolog 2.1.
ftp://ftp.cs.bris.ac.uk/goedel
info: goedel@compsci.bristol.ac.uk
只是为了打印这个:
Goedel
我使用了以下句子,但它并没有按我的意愿工作:
awk -F " - " "/ - /{ print $1 }"
它显示以下内容:
Goedel
1994, ISBN 0-262-08229-2. Goedel 1.4
有人可以告诉我我必须修改什么才能得到我想要的吗?
提前致谢