Sample Header Ad - 728x90

Why command `cat test.log |while read line; do echo $line ; done` would compress whitespace?

0 votes
0 answers
55 views
I have a file named "test.log" with contents: 2 root 20 0 0 0 0 S 0.0 0.0 0:00.01 [kthreadd] Then I use while-read command to process it: cat test.log |while read line; do echo $line ; done and It returns 2 root 20 0 0 0 0 S 0.0 0.0 0:00.01 a Wired,something was truncated.What happend?
Asked by 傅继晗 (101 rep)
Nov 6, 2024, 04:46 AM
Last activity: Nov 6, 2024, 07:44 AM