Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Something interesting I found out whilst following these instructions: My version of linux has two different echo commands `echo` and `/bin/echo`.

The basic one cannot accept any flags and when I type `echo "\x01"` it prints `\x01`

The one in bin can accept flags, and requires the -e flag to interpret backslashes.

This changes the echo line of the program to this:

`/bin/echo -e "\x01"`

I found this out because it was changing the byte from 00 to 5C rather than 01, because 5C is the ASCII for \



Interesting. You might be seeing the bash (or other shell) `echo` builtin.


$ which echo

echo: shell built-in command.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: