Hacker News new | past | comments | ask | show | jobs | submit login

I've used the -e option in GNU's echo many times. The various other versions are strictly less useful to me.

Does the option really belong in echo? Who knows, but it's certainly been useful to me.

UNIX fifth edition goes for absolute minimalism. Echo in Plan 9 is apparently used enough that it's worthwhile to optimize the number of times write is called. FreeBSD echo looks like someone just learned about writev. OpenBSD's seem like the sanest of the minimalists.

What's the takeaway for you?





I've used -e on GNU's `echo` quite a bit as well. But FreeBSD also supports `printf` (as does Linux by the way), so it's not a great inconvenience the missing -e flag on FreeBSD's `echo`.

    $ printf "This\tis an\nexample\n"
    This    is an
    example
You can also use the usual C-style printf parameters as well:

    $ printf "This is %-20s example\n" another
    This is another              example




Registration is open for Startup School 2019. Classes start July 22nd.

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

Search: