Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
And I need it to looks like this18450 0600060009 25 0 768188519 768188519 + 0030020124 000 000 10 77019 73587 25 0 73165 7307 +40506 0160100051 029 000 74049 25 0 73950 + 1040030047 030 000 14048 14048 25 0 11833 1183 +3 022 000 18450 0600060027 25 0 709948778 709948778 + 0010030064 000 000 10 73330 25 0 0050312875 7702 +0 000 000 18450 0600040020 25 0 703820853 703820853 + 0030020125 000 000 10
Now, what happened is that everything that has been melformated had shifted 5 spaces to the right for some reason. I know that bash SED would be maybe the easiest way to solve it but I just don't know how to do it. I've tried with printf, but my problem is how to read empty spaces into a variable/list. Could you please help ?18450 0600060009 25 0 768188519 768188519 + 0030020124 000 000 10 77019 73587 25 0 73165 730740506 + 0160100051 029 000 74049 25 0 73950 + 1040030047 030 000 14048 14048 25 0 11833 11833 + 022 000 18450 0600060027 25 0 709948778 709948778 + 0010030064 000 000 10 73330 25 0 0050312875 77020 + 000 000 18450 0600040020 25 0 703820853 703820853 + 0030020125 000 000 10
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Reformat file with empty spaces
by poj (Abbot) on Jan 11, 2018 at 09:09 UTC | |
by Anonymous Monk on Jan 11, 2018 at 09:54 UTC | |
|
Re: Reformat file with empty spaces
by kcott (Archbishop) on Jan 12, 2018 at 00:47 UTC | |
by Anonymous Monk on Jan 12, 2018 at 11:11 UTC | |
|
Re: Reformat file with empty spaces
by Laurent_R (Canon) on Jan 11, 2018 at 13:55 UTC | |
by Anonymous Monk on Jan 12, 2018 at 14:28 UTC |