不明白 atquery 命令脚本

don't understand atquery command script

我正在使用大数据数据库。在它的一个教程中,它建议我使用下面的 bash 脚本,如果为了 运行ning 查询:

#!/bin/sh
# this will launch the real atquery program with the given .sql file
# note: please adjust INSTALLNAME, HOST and PORT to reflect your installation
/home/lms/INSTALLNAME/atquery HOST:PORT $*

Then, start runnable .sql files like the following:

#!/usr/local/bin/runatquery
select count(*) from mytable during all

我不理解 /home/lms/INSTALLNAME/atquery HOST:PORT $*$* 部分。 $* 会做什么? 这是假设创建一个 shell 脚本以便 运行 查询,但另一个问题是这是两个文件(我想是因为我们在其中有两个 #!)那么这两个如何文件帮我 运行 查询?我想如果我们有一个包含以下代码的脚本,它会更好地完成这项工作并且不会造成混淆:

!/bin/sh

/home/lms/INSTALLNAME/atquery HOST:PORT -e 'select count(*) from mytable during all'

您必须按照建议创建该脚本(您没有包括它,可能就在脚本之前)作为一个带有可执行位的文件,并更改 INSTALLNAMEHOSTPORT 根据您的系统要求。

$* 扩展为脚本接收到的所有参数。

第二个文件是一个示例,说明如何创建由 runatquery 编写的 运行 脚本。