> But with Ruby here, it silently does, well, I don't know:
> 
> [gc@obiwan ~] echo -e "_123456789_" | ruby -w -pe 'sub(/
\067/,"x")'
> _123456x89_
> [gc@obiwan ~] echo -e "_123456789_" | ruby -w -pe 'sub(/
\068/,"x")'
> _123456789_
> [gc@obiwan ~] echo -e "_123456789_" | ruby -w -pe 'sub(/
\070/,"x")'
> _1234567x9_
> 

I *think* I know what's happening in the second case.
Ruby is smarter, not dumber, than you think.
It realizes that 8 is not a valid octal digit, so you get
a regex of an ASCII 6 followed by a character 8. Since this
pattern is not matched, nothing happens.

Hal