简体   繁体   English

获取输入作业值以在命令执行Rundeck中使用它

[英]Get input job value to use it in a command execution Rundeck

My Rundeck detail: 我的Rundeck详细信息:

Rundeck version: 2.10.7
install type: rpm
OS Name/version: CentOS 6.7
DB Type/version: h2

I want to get all data from a required input data and use it in a script execution as follows: 我想从所需的输入数据中获取所有数据,并在脚本执行中使用它,如下所示:

/home/user/script.sh INPUTDATA1 INPUTDATA2

I tried next variables but it does not work: 我尝试了下一个变量,但它不起作用:

/home/user/script.sh $RD_OPTION_1 $RD_OPTION_2

What should I do? 我该怎么办?

I think about modifying the script.sh to get those input options as @option.1@ but I'd prefer to use the scripts without modifying them. 我考虑过修改script.sh以将这些输入选项作为@option.1@来获取,但我宁愿使用脚本而不修改它们。

The convention is whatever is the field name that should be given after RD_OPTION_. 约定是在RD_OPTION_之后应提供的字段名称。 For example if message is field name it will be $RD_OPTION_MESSAGE. 例如,如果消息是字段名,则它将是$ RD_OPTION_MESSAGE。 Make sure your you are passing right names, based on your question, it expects field names 1 and 2. You can read more on this documentation 确保您传递正确的名称,根据您的问题,它要求使用字段名称1和2。您可以阅读本文档的更多内容

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在Java中执行curl命令 - curl command execution in java 尝试使用[]获取参数值 - Trying to use [] to get value of parameter Windows 命令 FOR LOOP - 如何使用计数器的先前值? - Windows Command FOR LOOP - how to use previous value of counter? 如何在没有 document.getElementById('..') 的情况下获取输入(文本)字段的值 - How to get a value of an input (text) field without document.getElementById('..') 是否有任何信息来获取存储过程输入参数的默认值? - Is there any Information to get default value of stored procedure Input parameters? Rails:使用 html 输入标签获取选中的单选按钮值 - Rails: Get checked radio-button value with html input tags 如何从pytest_addoptions访问pytest conftest中的命令行输入并将其用于夹具参数中? - How do I access the command line input in pytest conftest from the pytest_addoptions and use it in fixture params? 使用javascript函数参数从对象获取值 - Use javascript function parameter to get value from object 如何从URL参数获取base64编码的值并将其放在使用JavaScript的输入字段中 - How to get base64 encoded value from URL parameters and place it in an input field with JavaScript 当我输入值“45”时出现错误,我在轨道上得到“0.45e2”ruby - bug when i input value “45” i get “0.45e2” ruby on rails
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM