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

Of course you can, but shell scripting really fucking sucks.

One moment you have a properly quoted JSON string, the next moment you have a list of arguments, oops you need to escape the value for this program to interpret it right, but another program needs it to be double-escaped, is that \, \\, or \\\\? What subset of shell scripting are we doing? Fish? modern Linux bash, macOS-compatible bash? The lowest common denominator? My head is spinning already!

If I want to script something I'm writing Python these days. I've lost too much sleep over all the "interesting" WTF situations you get yourself into with shell scripting. I've never used Hurl but it's been on my radar and I think that's probably the sweet spot for tasks like this.



Ok agreed. But you can also just use any scripting language of your choice. Now you have a completely open development platform for your APIs.

I guess parsing cmd line outputs would be annoying. Would be a worth while library to write




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

Search: