A digression on echo. - Other *nix-like OSes & POSIX related

Users browsing this thread: 3 Guest(s)
z3bra
Grey Hair Nixers
Good job digging up the history behind it. it was a really interesting read !

Reading the source code for echo under different implementations has been an exercise many people have taken to compare code complexity (obviously, GNU "wins" here).

I personally only use "echo" to print out debug statements, or quickly output a variable name. For example, all my scripts feature this snippet:

Code:
usage() {
    echo "usage: $(basename $0) [-flags] args..." >&2
}

Whenever I need to print out formatted stuff, printf(1) is my goto as it is much more convenient.


Messages In This Thread
A digression on echo. - by seninha - 20-04-2020, 10:57 AM
RE: A digression on echo. - by jkl - 20-04-2020, 03:31 PM
RE: A digression on echo. - by z3bra - 20-04-2020, 03:40 PM
RE: A digression on echo. - by seninha - 20-04-2020, 04:29 PM
RE: A digression on echo. - by jkl - 20-04-2020, 04:33 PM
RE: A digression on echo. - by z3bra - 21-04-2020, 05:09 AM
RE: A digression on echo. - by jkl - 21-04-2020, 05:13 AM
RE: A digression on echo. - by twee - 21-04-2020, 05:22 PM
RE: A digression on echo. - by seninha - 28-11-2020, 11:23 AM