Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You can implement arrays for POSIX shell in POSIX shell by changing the input separator to new line, and writing some simple helper functions to search for it. It’s not the prettiest solution but works for many use cases of arrays in shell scripts.


There are much more practical ways to iterate over a list than that in dash.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: