I have a .pot file produced by xgettext on my c++ source code in format:
#: file1.cpp:line
#: file2.cpp:line
msgid "" - empty string
#: file1.cpp:line
#: file2.cpp:line
msgid " \t\n\r" - string contains only spaces
#: file1.cpp:line
#: file2.cpp:line
msgid "real text"
Then i use command like:
grep "#: " "$(POT_FILE)" | sed -e 's/^\(#: \)\(.*)/\2'
to have the only file names and lines to be in the output.
But the thing is that I don't need files for the strings containing only spaces.
It's quite complicated because I have to find the line msgid "" or such just next to the sequence of lines #: blablabla and according to the contents of the string bypass all preceding lines.
Can anybody help with such command?
Thanks!