in reply to How to re-arrange and edit lines in a text file

Do I read the second column into a variable, edit that variable, then append it to the end of the line? I'm just unsure how to proceed.

Yes, this is a good approach.

Saving the current line into a variable is useful if you want to keep the current line 'as-is'. If you want to get fancy you could also create an intermediate representation of the output in memory (probably as an 'array of arrays') calculate the longest value length for each column and create properly indented columns from scratch.
Just remember: You can't spell 'pretty pointless' without 'pretty'. ;)

  • Comment on Re: How to re-arrange and edit lines in a text file