Only one word in the first line of text.
Posted: Tue May 03, 2011 9:06 pm
I have a problem. Now I have hundreds of large files that look like this:
word1 word2 word3 word4 word5
word1 word2 word3 word4 word5
word1 word2 word3 word4 word5
word1 word2 word3 word4 word5
.....
(Some files starts with a blank line...)
The first line of each file is the name of the HTML file. There can be only one word and no spaces. How do I change all the documents that the first line was only the first word of whole text? :
word1
word2 word3 word4 word5
word1 word2 word3 word4 word5
word1 word2 word3 word4 word5
word1 word2 word3 word4 word5
word1 word2 word3 word4 word5
word1 word2 word3 word4 word5
word1 word2 word3 word4 word5
word1 word2 word3 word4 word5
.....
(Some files starts with a blank line...)
The first line of each file is the name of the HTML file. There can be only one word and no spaces. How do I change all the documents that the first line was only the first word of whole text? :
word1
word2 word3 word4 word5
word1 word2 word3 word4 word5
word1 word2 word3 word4 word5
word1 word2 word3 word4 word5