echo is not the most portable method to pipe output. In some systems echo -n hello will output "-n hello". I was experiencing this when getting an "invalid JSON" error while creating buckets with riak admin. printf is a more reliable way to "echo" variables without newlines.
echo
is not the most portable method to pipe output. In some systemsecho -n hello
will output"-n hello"
. I was experiencing this when getting an "invalid JSON" error while creating buckets withriak admin
.printf
is a more reliable way to "echo" variables without newlines.