[NCLUG] bash question

Warren Turkal wt at penguintechs.org
Fri Apr 27 16:23:26 MDT 2007


Everyone,

Can anyone explain why the following doesn't result in a newline (0x0a)
being piped to od?

wt at pyrus:~/test/ctest$ echo -n "$(echo -ne "\n")" | od -t x1 -t a
0000000


The following works as expected:

wt at pyrus:~/test/ctest$ echo -n "
" | od -t x1 -t a
0000000 0a
         nl
0000001


Is this a bug in bash or am I just doing something silly?

wt
-- 
Warren Turkal
Penguin Techs...Taking the "hertz" out of gigahertz!(TM)
901-338-1337



More information about the NCLUG mailing list