Hi,
I have a file with cvs output:
Code:
Checking in src/com/blah/Foo.java;
/home/cvs/cvsroot/project/src/com/blah/Foo.java,v <-- Foo.java
new revision: 1.2; previous revision: 1.1
done
Checking in src/com/blah/Bar.java;
/home/cvs/cvsroot/project/src/com/blah/Bar.java,v <-- Bar.java
new revision: 1.7; previous revision: 1.6
done
I want to parse this file line by line:
Code:
LINES="$( cat cvsout.txt )"
for i in $(<LINES); do
echo $i
done
but this converts each white space into a new line, so I get
Code:
Checking
in
src/com/blah/Foo.java;
...
What am I doing wrong here? Any suggestions?
Thanks in advance.
PS: if it helps, my end goal is to format the text into a tidier output that looks like this:
Code:
project/src/com/blah/Foo.java:1.2
project/src/com/blah/Bar.java:1.7