Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
stormbrew
on Aug 13, 2013
|
parent
|
context
|
favorite
| on:
PS1 generator
I have this bit of magic in mine to map return codes to some semblance of a string version of them:
LED=$(perl -le "\$!+=${LE};print \$!" 2>/dev/null || echo "unknown error")
It's not perfect but I haven't found a more reliable way to map exit status' to something like the right meaning.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: