Created
September 5, 2015 19:14
-
-
Save NobleUplift/aa55cd3a6ad9e9bab92f to your computer and use it in GitHub Desktop.
No idea what this was for. Needed it in 2011 for something...
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/sh | |
print_array() { | |
eval ARRAY=\${$1[*]} | |
echo ${ARRAY[*]} | |
for ELEMENT in ${ARRAY[@]}; do | |
echo $ELEMENT | |
done | |
} | |
QUEUE=( one two three ) | |
#OLD_IFS=$IFS | |
#IFS='' | |
#NEW_QUEUE=(${QUEUE[*]}) | |
print_array QUEUE | |
#IFS=$OLD_IFS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment