I'm working on cleaning up NAMES i.e remove the dots and spaces before the actual name starts. Example - Below is the test file
$ cat names.txt
J.J. Scott
J. S. Joyce
RV. Bradley Carter
M. N. K. Brailey
$
I need the output as below
JJ Scott
JS Joyce
RV Bradley Carter
MNK Brailey
The below perl attempt is not working for all scenarios.
perl -ne ' s/\.//g; s/ //; print ' names.txt