Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
glic3rinu
on Nov 9, 2019
|
parent
|
context
|
favorite
| on:
Curl to shell isn't so bad
A common solution is to wrap all code within a function. This way nothing gets executed until the last line, the one that calls the function, is executed.
function main () { # all code goes here } main
amalcon
on Nov 9, 2019
[–]
Common, but not universal. If I pipe a response body into a shell, I don't get to check whether they were careful or not.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: