Is it possible to create and use a list of objects in BASH environment
I am working in an environment bash
and trying to make a list of sample names; each of which will be passed to a command set. Creating lists in R and Python is very easy. However, I have not been able to figure out if and how equivalent list variables can be created and accessed in bash
.
For example, to create a list in python, you could write:
samples=[sample1 sample2 sample3]
To access the first variable in the list, one can use:
currentSample = samples[0]
Is it possible to perform similar operations bash
with a list of text strings?
+3
source to share