Here is a LIST:
List = "abcd 1234 jvm something"
How to get the second element "1234" without looping all the list?
|
|
|
no spaces between equal sign
Some other ways, although not as efficient as using shell's internals
|
|||||||||||
|
|
Just to supplement ghostdog's answer: you could also put
Note that the array indices are counted 0,1,2,... . This has the advantage of not polluting the shell environment with too many new variables. |
||||