which command convert all Chinese word to one word per line?

echo "只看該作者" | xxx
>>




Try this
  1. echo "只看該作者" | sed -e 's/\(.\)/\1\n/g'
複製代碼
For Latin characters, you can make use of the command 'fold'.  Unfortunately, it doesn't work with Chinese characters.

TOP

回復 2# quintus


great, thanks a lot.
it's what I want.

TOP

回復 2# quintus

what a clever hack! i was thinking things like awk, while/read ..etc :P

TOP