Hi - I've gone a bit rusty so .....
I have a GEDCOM file (used in genealogical circles) containing lines with names in the format
1 NAME Surname /Firstname/
as well as lots of other linetypes. The Firstname on input is enclosed in forward-slashes.
I want to use gawk to edit these lines (i.e. lines starting with "1 NAME ") and swap the Surname and Firstname in each case. The forward-slashes should remain in the same position on output i.e. enclosing the Surname..... giving
1 NAME Firstname /Surname/
Other lines should be output without change.
Any help appreciated.
I have a GEDCOM file (used in genealogical circles) containing lines with names in the format
1 NAME Surname /Firstname/
as well as lots of other linetypes. The Firstname on input is enclosed in forward-slashes.
I want to use gawk to edit these lines (i.e. lines starting with "1 NAME ") and swap the Surname and Firstname in each case. The forward-slashes should remain in the same position on output i.e. enclosing the Surname..... giving
1 NAME Firstname /Surname/
Other lines should be output without change.
Any help appreciated.