1. There is a text test.log, content that is:
1 an A
2 b B
3 c C
2. Execute while to get normal output
cat test.log |while read item;do echo $item;done
1 an A
2 b B
3 c C
3. But executing while+awk loses the first line
cat test.log |while read item;do awk "{print $1"A"}";done
2A< hr > < H2 > question: why did you lose the first row of data? < / H2 > < H2 > second question: how do I get the following output? < / H2 >
3A
1A
2A
3A