use printf to simplify output

test-cmdtok is modified