出现语法错误:尝试从Shell脚本执行Prolog程序时

时间:2019-09-20 09:31:39

标签: prolog

我在尝试从Shell脚本执行prolog程序时遇到Syntax error: "(" unexpected。 这是我的shell脚本:

#!/bin/sh
set -xv
yap -L test1(pos,1,2))\. >> rules.pl

这是错误消息:

yap -L test1(pos,1,2))\. >> rules.pl
./tp.sh: 3: ./tp.sh: Syntax error: "(" unexpected

test1(pos,1,2).在我直接从yap运行时运行。

已经尝试过How to run prolog queries from within the prolog file in swi-prolog?

0 个答案:

没有答案