0
I use the following code and failed.
$ echo $TERM
xtermc
$ v=/bin:/usr/bin:/usr/local/bin ; echo $v | tr ':' '\n'
/binn/usr/binn/usr/local/bin
It seems skip my '/'. I don't know how to solve this. My shell is zsh. I've changed to bash, but still failed.
But, on another machine, it works. and the result is
/bin
/usr/bin
/usr/local/bin
I found there are three tr
/usr/local/bin/tr (GNU coreutils) 6.4
/usr/ucb/tr unkown version size 9916 bytes
/bin/tr size 19400 Usage: /bin/tr [ -cds ] [ String1 [ String2 ] ]
Are both machines running Solaris? Could you post the output of
which tr
andtr --version
on both machines? – Dennis – 2014-03-13T03:09:58.857