Skip to contentSkip to conversation

t0025 weird behaviour on NonStop ksh/bash

DISCUSSION Randall S. Becker 1 participant 1 message Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

On May 8, 2015 7:17 PM , I wrote in my haste:

Quoted 1 line

Ok, I'm sure that this is not a git problem, but there is an assumption

about

Quoted 1 line

echo behaviour in t0025 that may not be correct. When executed from a

shell

Quoted 2 lines

function on the HP NonStop platform under ksh and bash, the LFonly file annoyingly contains cr-lf not just lf. This causes sub-test 4 to fail.

Weirdly, this

Quoted 1 line

does not happen from an interactive shell. My proposed solution, in

t0025-crlf-

Quoted 1 line

auto.sh, to this is to make it explicit that bad behaviour on the part of

echo

Quoted 10 lines

should be dealt with severely, as in:

for w in Hello world how are you; do echo $w; done | tr -d '\r'
LFonly

instead of

for w in Hello world how are you; do echo $w; done >LFonly

which is a no-op on platforms that behave themselves in this situation. Is

this

Quoted 1 line

the proper approach?

Digging deeper, this appears to be is Yet Another Platform Problem. There are more '\r' characters sneaking about beyond just echo. I am taking it up with other developers to see whether we can track down where the offending '\r' characters are coming from. They do not appear to be from git or its tests at this stage

Cheers,
Randall

-- Brief whoami: NonStop&UNIX developer since approximately UNIX(421664400)/NonStop(211288444200000000)
-- In my real life, I talk too much.

.