gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gpsd-dev] [PATCH 1/2] Fixes echo nonportability in regress-driver.


From: Fred Wright
Subject: Re: [gpsd-dev] [PATCH 1/2] Fixes echo nonportability in regress-driver.
Date: Mon, 22 Feb 2016 20:15:41 -0800 (PST)

On Mon, 22 Feb 2016, Greg Troxel wrote:
> Fred Wright <address@hidden> writes:
>
> > This change eliminates the -n by constructing the elapsed time message
> > as a single line (since there's no fully portable way to suppress the
> > newline after an echo).
>
> That's correct, because POSIX does not specify -n, although OS X is the
> only place I know where it's missing.  The portable way if necessary is

It's not even really missing from OS X, so I think it just comes from
bash's being invoked as '/bin/sh', though I'm not sure why bash's
sh-compatibility feature is OS-dependent.

> printf(1).  But avoidance of complexity is a great strategy (really, not
> being snide).

Exactly.  The printf approach looked less readable.

Fred Wright



reply via email to

[Prev in Thread] Current Thread [Next in Thread]