[lug] Losing what little Unix cred I once had

Daniel Webb lists at danielwebb.us
Thu Dec 14 20:54:14 MST 2006


$ a="$(echo -n -e '\0011')"
$ echo -n "test two three" | grep "$a"
<nothing>

$ a="$(echo -n -e '\0012')"
$ echo -n "test two three" | grep "$a"
test two three

$ a="$(echo -n -e '\0013')"
$ echo -n "test two three" | grep "$a"
<nothing>

Why?  \0012 is the echo escape for linefeed in octal.  So where is a linefeed
getting in there?




More information about the LUG mailing list