- 论坛徽章:
- 0
|
Hi, all
I have a bash code as follows:
for divideLine in `grep -n '^End\ of' SimpleDraw`
do
echo $divideLine
done
when I run this command: grep -n '^End\ of' SimpleDraw. the output is:
54:End of Canvas.cpp
91:End of Canvas.h
396:End of CommandParser.cpp
494:End of CommandParser.h
525:End of CommonTypes.h
543:End of Coordinate.cpp
557:End of Coordinate.h
but when I run the above bash code, it seperated the line as follows:
54:End
of
Canvas.cpp
91:End
of
Canvas.h
396:End
of
CommandParser.cpp
anybody can help me to solve this problem?
thanks so much. |
|