[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Text Manipulation



All,
 
I have racked my brains trying to figure out a way to insert
a column of white space in a plain text file several (tens of)
thousands lines long.  The problem is there is no common text
before or after the column I need to insert the blank space.
 
For example, take the following block of text:
 
12345ABCDE67890FGHJK
Q1W2E3R4T5Y6U7I8O9P0
MNBHGVFRT7352508HY7S
THISLINEHASNOBLANKS2
ANOTHERLINEWITHNONE5
1MORELINEWITHNONEZZZ
 
I would like to insert a column (or two) of white space to
essentially create fields to be manipulated with NAWK, so
that the above text would look like the following:
 
12345AB CDE67890F GHJK
Q1W2E3R 4T5Y6U7I8 O9P0
MNBHGVF RT7352508 HY7S
THISLIN EHASNOBLA NKS2
ANOTHER LINEWITHN ONE5
1MORELI NEWITHNON EZZZ
 
I can use PERL, if necessary, but have a preference for either a shell script or SED command, etc..
 
Any ideas?

Thanks in advance,

Tyler