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

Since not a lot of folk knew this at my shop: wordexp() is the posix library for lexing strings "like the shell".


Note that wordexp() will also, unless explicitly told otherwise, perform command substitution and thus is capable of executing other processes. Be wary of using it on untrusted input.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: