Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

bash adding to array

#!/bin/bash

#Making an array
array=(1 2 3)

#Appending the array
array+=(4)

#Printing the array
echo ${array[@]}
 
PREVIOUS NEXT
Tagged: #bash #adding #array
ADD COMMENT
Topic
Name
6+5 =