Description
Given a data file, we want to left justify the field
consists of 11th through 20th columns by removing leading spaces of them.
Data not belonging to this field should not be altered.
|
| Raw Input
|
| Desired Output
| 123456789012345678901234567890
Kevin GLX-134 Ford
Grace LG-778NCiteron
Kelly PQ-3312 Audi
Joseph X-YZ79 Honda
|
| 123456789012345678901234567890
Kevin GLX-134 Ford
Grace LG-778N Citeron
Kelly PQ-3312 Audi
Joseph X-YZ79 Honda
|
|
Script and Comments
Script1 [ 1] s/^.{20}/&\n/
[ 2] s/^(.{10})( *)([^\n]*)\n/\1\3\2/
| |
|