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

Agreed. The only reason I've had to learn any 'real' shell is to write portable init scripts. That being said, I'd probably rather write init scripts in ruby or python anyway.

Besides, init scripts aren't really portable (across distros) to start with, ubuntu/debian scripts rely on start-stop-daemon and a specific filesystem layout. The use of shell for init scripts is probably only useful because using dash (/bin/sh) to execute them is likely faster than using a fancier language (though I haven't benchmarked this).

BTW, ever try and write anything non-trivial using dash (POSIX shell features only). It's pretty painful. Lots of people mistakenly write shell using non-posix (bash) features, and are unpleasantly surprised when /bin/sh links to dash, thus breaking their scripts.



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

Search: