I have the following data.txt:
95 flour. 47 water.s etc..
I need to remove everything after the period (.) in the file to yield s
.
This is the simplest:
sed "s/\..*//"
And this is, I think, one of the best ways of doing it (better than pure bash or Python).