In Bash: Can I treat the list of args in a for loop as a list? -
Can I cure the list of algens for the loop as a list? Can I access the elements in the list with list list? To run this pseudo code:
#! / Bin / bash i in 1 2; The next element for the do j = loop echo current is $ i and the next is $ j The output must be first to run:
the current is 1 And the next 2 is
What will happen to the second iteration of the loop?
Try this code instead:
declare -a For data = (1 2) ((i = 0; i
Comments
Post a Comment