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 seemed to work:
sed "s/[.].*//" data.txt > cleaned.txt
I would be interested to know how this can be done alternatively in bash and python, if anyone wouldn't mind sharing?
Thanks!