Quote:
Originally Posted by gus2000
Code:
awk 'BEGIN{a[1]="abc";a[2]="def";print length(a)}'
2
Once you know the number of elements, you can use a for loop.
|
Thanks for the reply ,, Yes I do know how many elements are in the array,
but my problem is to print it in one variable
suppose if my number of elements in the array is 3 ,then my commnad should look like this
Code:
input = sprint line[1] line[2] line[3]