How do I create an array in unix shell scripting?
相关问题
- How to get the return code of a shell script in lu
- How to get the maximum of more than 2 numbers in V
- Faster loop: foreach vs some (performance of jsper
- Convert Array to custom object list c#
- pick a random item from a javascript array
相关文章
- 使用2台跳板机的情况下如何使用scp传文件
- In IntelliJ IDEA, how can I create a key binding t
- Numpy matrix of coordinates
- Check if directory exists on remote machine with s
- shell中反引号 `` 赋值变量问题
- How get the time in milliseconds in FreeBSD?
- PHP: Can an array have an array as a key in a key-
- Making new files automatically executable?
in bash, you create array like this
to call the elements
to ask for user input, you can use read
Try this :
The following code creates and prints an array of strings in shell:
Result:
An array can be loaded in twoways.
or
-- Load the array with the strings alpha, beta, and gamma
Also, I think below information may help:
In case you want to access the array:
To read the values from keybord and insert element into array
You can read the ABS "Advanced Bash-Scripting Guide"