Skip to contentSkip to conversation

Avoid using non-portable `echo -n` in tests.

PATCH Francis Galiegue 3 participants 4 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

Le Friday 31 October 2008 19:39:33 Jeff King, vous avez écrit :
[...]

Quoted 4 lines

Agreed, and actually I found such a bashism (test ==) last week (though of course it also broke on FreeBSD).

As for bash-isms, a hunt for $(...) also looks necessary...

$ grep -rl '\$([^)]\+)' $(find -type f)|wc -l
272

Unless I'm mistaken (and I probably am), the $(...) construct is bash-specific, isn't it?

Signature · 1 line
fge
#1 lore raw
Quoted 7 lines · Francis Galiegue

Le Friday 31 October 2008 19:39:33 Jeff King, vous avez écrit :
[...]

Quoted 4 lines

Agreed, and actually I found such a bashism (test ==) last week (though of course it also broke on FreeBSD).

Quoted 7 lines

As for bash-isms, a hunt for $(...) also looks necessary...

$ grep -rl '\$([^)]\+)' $(find -type f)|wc -l
272

Unless I'm mistaken (and I probably am), the $(...) construct is bash-specific, isn't it?

Nope. Read section 2.6.3 Command Substitution here,

<http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html>