Horje
bash array append Code Example
bash adding to array
#!/bin/bash

#Making an array
array=(1 2 3)

#Appending the array
array+=(4)

#Printing the array
echo ${array[@]}
bash array append
for i in $(seq 2.5 .1 5);
do
    # Print the value
    echo $i " ########";
    arrVar+=($i) # appending 

done

# Iterate the loop to read and print each array element
for value in "${arrVar[@]}"
do
     echo $value
done

other ways : https://linuxhint.com/bash_append_array/


2.5
2.6
2.7
2.8
2.9




Shell

Related
sudo add-apt-repository ppa:diodon-team/stable Code Example sudo add-apt-repository ppa:diodon-team/stable Code Example
kill cron proccess ubuntu terminal Code Example kill cron proccess ubuntu terminal Code Example
django flush sessions on server startup Code Example django flush sessions on server startup Code Example
powershell check file extension Code Example powershell check file extension Code Example
vs code gith hub credentials aren't keep arch linux Code Example vs code gith hub credentials aren't keep arch linux Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
13