4 ms·
Check out ShQQ, a Haskell module that does something like that: http://mainisusuallyafunction.blogspot.com/2011/10/shqq-embedding-shell-commands-in.html http:/
by cheatercheater 15y ago
Check out ShQQ, a Haskell module that does something like that:
http://mainisusuallyafunction.blogspot.com/2011/10/shqq-embedding-shell-commands-in.html http://mainisusuallyafunction.blogspot.com/2011/10/shqq-embe...
> λ> let x = "/proc/uptime" in [sh| sha1sum $x |]
> "337ec3fb998fb3a4650a18e0785f0992762b3cda /proc/uptime\n"
- rcthompson 15y agoYeah, I kind of figured Haskell would have solved this problem in a way that makes the typical syntax do the right thing (shell-quote the interpolated variables) and then provides an override for those few cases when you're doing something weird.