Last active
April 11, 2017 23:35
-
-
Save tanzyy/50017e9514de4100ea995cc82b9028e8 to your computer and use it in GitHub Desktop.
Shell | Add value to array
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script shows how to declare array and and add vlaues to it. | |
result=() | |
result+=('foo') | |
result+=('bar') | |
for i in "${result[@]}" | |
do | |
echo $i | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment