我尝试获取在特定客户端上运行的所有作业的列表。
运行时,autorep -J ALL -q
我得到以下输出:
/* ----------------- ### ----------------- */
insert_job: ### job_type: CMD
box_name: ###
command: ###
machine: MACHINE X
owner: autosys
permission:
date_conditions: ###
condition: ###
description: ###
box_terminator: 1
alarm_if_fail: 0
application: ###
/* ----------------- ### ----------------- */
insert_job: ### job_type: CMD
box_name: ###
command: ###
machine: MACHINE Y
owner: autosys
permission:
date_conditions: ###
condition: ###
description: ###
box_terminator: 1
alarm_if_fail: 0
application: ###
...
如您所见,此处显示了所有客户端的所有作业列表
我期望得到的是如下输出:
/* ----------------- ### ----------------- */
insert_job: ### job_type: CMD
box_name: ###
command: ###
machine: MACHINE X
owner: autosys
permission:
date_conditions: ###
condition: ###
description: ###
box_terminator: 1
alarm_if_fail: 0
application: ###
/* ----------------- ### ----------------- */
insert_job: ### job_type: CMD
box_name: ###
command: ###
machine: MACHINE X
owner: autosys
permission:
date_conditions: ###
condition: ###
description: ###
box_terminator: 1
alarm_if_fail: 0
application: ###
...
不幸的是,这些命令autorep -J ALL -q -m MACHINE X
不起作用,但给了我以下输出:
/* ----------------- MACHINE X ----------------- */
insert_machine: MACHINE X
type: a
factor: 1.00
port: 7520
node_name: MACHINE X
agent_name: WA_AGENT
encryption_type: DEFAULT
opsys: windows
character_code: ASCII
我猜这是添加机器的 JIL 格式,所以我不希望得到什么。
您知道我尝试做的事情是否仅使用 autosys 命令是可能的,或者我是否必须通过一些正则表达式解析第一个输出才能最终获得我想要的?