My question is about finding and saving the last word of each line.
I have multiple lines. This information is saved in a .txt
file. Thus, I am required to build a CMD script that can scan through the txt file, find the last word of each line and save it to a new .txt
document. The delimiters here will be the space.
For example:
It's a very small window<34>. The small birds were singing softly. There are three small rooms up stairs (4) The house has but two small second story bedrooms.
The result I would like to see saved in a separate txt document needs to look like the following:
window<34>. softly. (4) bedrooms.
I have tried many options and methods but unfortunately no luck.