简体   繁体   English

BASH脚本,环境变量和PID

[英]BASH SCRIPT, environment variables and PID

I need a little help with bash sctipt. 我需要bash sctipt的帮助。 I need BASH script, using environment variables: 我需要使用环境变量的BASH脚本:

First script will create an array of variables, which are stored in the script and the PID and -f. 第一个脚本将创建一个变量数组,这些变量存储在脚本以及PID和-f中。 Assigned to an array of variables in the environment variables. 在环境变量中分配给变量数组。 This script will be displayed his PID and runs the second script. 该脚本将显示其PID和运行第二个脚本。 The second script will be displayed the first script PID and the list by using -f (from first part) option in the environment variable and terminate the operation of the first script... 通过使用环境变量中的-f(从第一部分开始)选项,第二个脚本将显示第一个脚本PID和列表,并终止第一个脚本的操作...

I am hesitant to go much further since this is a hw problem and i am unsure what you are trying to do, so this is what i can do.... 我犹豫要走得多远,因为这是一个硬件问题,我不确定您要做什么,所以这就是我可以做的...。

in bash $$ will give you your current pid for the script 在bash $$中会为您提供脚本的当前pid

as for arrays, http://tldp.org/LDP/abs/html/arrays.html 至于数组,请访问http://tldp.org/LDP/abs/html/arrays.html

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM