-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Look into shell-supported data structures #27
Labels
Comments
It looks like it's not possible to export arrays in Bash: $ export ARRAY=(1 2 3)
$ env | grep ARRAY
$ |
$ declare -a ARRAY
$ ARRAY=(1 2 3)
$ echo ${ARRAY}
1
$ echo ${ARRAY[*]}
1 2 3
$ for i in ${ARRAY[*]}; do echo ${i}; done
1
2
3
$ echo ${ARRAY[1]}
2 |
array and associative arrays (dicts/hashes) are supported: https://www.shell-tips.com/bash/arrays/ |
$ export TEST=(1 2 3)
$ python3 -c "import os; print(os.getenv('TEST'))"
None
$ TEST=(1 2 3) python3 -c "import os; print(os.getenv('TEST'))"
(1 2 3) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It would appear at least Bash actually supports at least arrays. It's possible that support for these might be beneficial.
The text was updated successfully, but these errors were encountered: