From The Document Foundation Wiki
- Now, we want to retrieve the line number of the string in the output too. This is the -n option
- The syntax is:
grep -r -i -n 'word' directory
- Let me show you an example on our own directory with all the options we know:
sophie@sophie:~/libo_ui-fr$ grep -r -i -n 'Browse' accessibility/
- the output is:
accessibility/source/helper.po:23:"RID_STR_ACC_NAME_BROWSEBUTTON\n"
accessibility/source/helper.po:25:msgid "Browse"
- You can see, that the second entry contains the word to translate.