JasonCooper
IS-IT--Management
Hi,
I need to script the following:
find lines containing '5' in position 'x' and cut that line plus the next line into a new file.
Any help would be greatly appreciated
Many thanks in advance
Example file below:
10 451125158200601000400091210101 701 125.51
40 4511251582006 95039Please delete this
10 461126409200601000400091210501 701 138.22
40 4611264092006 95039Please delete this
10 391118262200601010400091210101 701 90.85
40 3911182622006 95039Please delete this
10 391123474200681020400091210101 701 90.59
40 3911234742006 95039Please delete this
10 451124973200681020400091210101 701 93.55
40 4511249732006 95039Please delete this
10 391123519200681020400091211201 701 98.78
40 3911235192006 95039Please delete this
10 341108109200681037400060210100 1004 46.18
40 3411081092006 Please delete this
10 341108113200681037400060210100 1004 14.30
40 3411081132006 Please delete this
10 351109759200651037400060210100 1004 11.54
40 3511097592006 Please delete this
10 351110074200651037400060210100 1004 14.30
40 3511100742006 Please delete this
10 351110076200651037400060210100 1004 23.09
40 3511100762006 Please delete this
10 351110077200651037400060210100 1004 11.54
40 3511100772006 Please delete this
10 351110131200651037400060210100 1004 23.09
40 3511101312006 Please delete this
10 351110166200651037400060210100 1004 14.30
40 3511101662006 Please delete this
10 351110260200651037400060210100 1004 12.53
40 3511102602006 Please delete this
I need to script the following:
find lines containing '5' in position 'x' and cut that line plus the next line into a new file.
Any help would be greatly appreciated
Many thanks in advance
Example file below:
10 451125158200601000400091210101 701 125.51
40 4511251582006 95039Please delete this
10 461126409200601000400091210501 701 138.22
40 4611264092006 95039Please delete this
10 391118262200601010400091210101 701 90.85
40 3911182622006 95039Please delete this
10 391123474200681020400091210101 701 90.59
40 3911234742006 95039Please delete this
10 451124973200681020400091210101 701 93.55
40 4511249732006 95039Please delete this
10 391123519200681020400091211201 701 98.78
40 3911235192006 95039Please delete this
10 341108109200681037400060210100 1004 46.18
40 3411081092006 Please delete this
10 341108113200681037400060210100 1004 14.30
40 3411081132006 Please delete this
10 351109759200651037400060210100 1004 11.54
40 3511097592006 Please delete this
10 351110074200651037400060210100 1004 14.30
40 3511100742006 Please delete this
10 351110076200651037400060210100 1004 23.09
40 3511100762006 Please delete this
10 351110077200651037400060210100 1004 11.54
40 3511100772006 Please delete this
10 351110131200651037400060210100 1004 23.09
40 3511101312006 Please delete this
10 351110166200651037400060210100 1004 14.30
40 3511101662006 Please delete this
10 351110260200651037400060210100 1004 12.53
40 3511102602006 Please delete this