Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
line="premon D0000070 0x201 0x40" # it has 26 chars echo $line | wc -c # giving out put 27 chars.
我想删除字符串中多余的字符..请帮忙?
实际上,您的字符串中没有额外的字符。 echo在行尾放置一个 '\n'。如果您不想回显该字符,则可以执行
echo
echo -n $line | wc -c