I have a file that needs a semicolon delimiter after the first field, which is 4 or 5 characters in length. I tried using sed (modified a sed script I found) and it was an epic fail…it inserted semicolons between every character. I just need to add a semicolon to the end of the first field.
Here is some example text:
2A19 kRSUnicode 205.8
2FA1A kRSUnicode 206.2
2FA1B kRSUnicode 207.5
And the output I’m hoping for:
2A19; kRSUnicode 205.8
2FA1A; kRSUnicode 206.2
2FA1B; kRSUnicode 207.5
Anyone know how to do this? Thank you!
Tabs and spaces are known as whitespace. This will replace the first character of whitespace with a semicolon:
This will replace the first instance of all whitespace with a semicolon:
This will replace all instances of whitespace with a semicolon: