How to remove last character only if it's there?
input:
OpenOffice.org/m openOffice.org/ozm Pers. Pfg. phil. Prof. resp. Roonstr./m roonstr./ozm
desired output:
OpenOffice.org openOffice.org Pers Pfg phil Prof resp Roonstr roonstr
I got it so far that only the dot is left but unfortunately the last sed command removes also letter g too:
$ cat filename | grep "\." | cut -d"/" -f1 | sed 's/.$//'