Hi Ingo,
> > The time-honoured way to get modern-day `printf foo' is
> >
> > echo foo | tr -d \\012
>
> Thanks for looking at it, but unfortunately, that does not work at all.
> I just tested the version you suggest, and even on OpenBSD, it does not
> work:
>
> . pso sh -c \
> "printf '%s' '.ds *f ' ; \
> ls \\*[fontpath]/dev\*[.T] \
> | tr -d \\012"
My pipeline was an example for sh(1); its special characters need
escaping if it's to undergo more levels of interpretation. The `.pso'
above keeps the printf when my point was to return to echo, and applies
my suggested tr to ls's output, not echo's.
I was giving an equivalent to `printf foo'. This deleting tr is not
attempting to also do the work of any other tr that's transliterating to
spaces.
$ cat ingo.tr
.nf
.pl 3
.pso sh -c \
"echo foo \
| tr -d \\\\\\\\012 \
| od -c"
.bp
.pso sh -c " \
echo foo | \
tr -d '\\\\012' | \
od -c"
.bp
.pso sh -c " \
echo foo | tr -d '\\\\012'; \
ls /etc/passwd /etc/group | tr aeiou AEIOU"
$
$ nroff -U ingo.tr
0000000 f o o
0000003
0000000 f o o
0000003
foo/Etc/grOUp
/Etc/pAsswd
$
Cheers, Ralph.