How do I delete the last eight digits of each line?
Here is a sample of what needs to be deleted:
L258A:lp=L258:sd=LXXXK.S11:qt=text:00001000
L258B:lp=L258:sd=LXXXK.S11:qt=raw:00002000
L629A:lp=L629:sd=LXXXK.S11:qt=text:00003000
L629B:lp=L629:sd=LXXXK.S11:qt=raw:00004000
D206:rm=WXXBQ9Q2:rp=P11111PLD19L206DRAFT$:qt=auto:qg=107:00005000
D208:rm=WXXBQ9Q2:rp=P11111PLD19L208DRAFT$:qt=auto:qg=107:00006000
D210:rm=WXXBQ9Q2:rp=P11111PLD19L210DRAFT$:qt=auto:qg=107:00007000
D254:rm=NXXQ9QG:rp=P11111PLD19L254DRAFT$:qt=auto:qg=143:00008000
D255:rm=NXXQ9QG:rp=P11111PLD19L255DRAFT$:qt=auto:qg=143:00009000
D257:rm=NXXXQQG:rp=P11111PLD19L257DRAFT$:qt=auto:qg=143:00011000
.. --- gap in data ------------------------------------------------
C783:rm=WXSBQ9QF:rp=P11111PLD19L783$:qt=auto:qg=139:00065000
C545:rm=WXSBQ9Q6:rp=P11111PLD19L545$:qt=auto:qg=133:00066000
C546:rm=WXSBQ9Q6:rp=P11111PLD19L546$:qt=auto:qg=133:00067000
C547:rm=WXSBQ9Q6:rp=P11111PLD19L547$:qt=addd:qg=133:00068000
C548:rm=WXSBQ9Q6:rp=P11111PLD19L548$:qt=asss:qg=133:00069000
C256:rm=WXSBTQ75:rp=P11111PLD19L256$:qt=auto:qg=208:
P221A:lp=P221:sd=L003K.111:qt=text:00071000
P221B:lp=P221:sd=L003K.111:qt=raw:00072000
P301A:lp=P301:sd=L003K.111:qt=text:00073000
P301B:lp=P301:sd=L003K.111:qt=raw:00074000
TRRR:rm=AUxxxbM:rp=TRMS:cl=|writer=%f|jobn=%j:qt=cctl:00075000
The last 8 digits need to be deleted. There may be a line after the colon
) that doesn't have any digits so I may need to keep an eye out for those.
Any ideas on what the script will look like?
Is there a way for me to ask within the script.
Run the script.
Then you are prompted to enter the file that needs to be trimmed?
File is entered and the script is run against it and produces a different ouput file.
Thanks for any help that can be given.
Here is a sample of what needs to be deleted:
L258A:lp=L258:sd=LXXXK.S11:qt=text:00001000
L258B:lp=L258:sd=LXXXK.S11:qt=raw:00002000
L629A:lp=L629:sd=LXXXK.S11:qt=text:00003000
L629B:lp=L629:sd=LXXXK.S11:qt=raw:00004000
D206:rm=WXXBQ9Q2:rp=P11111PLD19L206DRAFT$:qt=auto:qg=107:00005000
D208:rm=WXXBQ9Q2:rp=P11111PLD19L208DRAFT$:qt=auto:qg=107:00006000
D210:rm=WXXBQ9Q2:rp=P11111PLD19L210DRAFT$:qt=auto:qg=107:00007000
D254:rm=NXXQ9QG:rp=P11111PLD19L254DRAFT$:qt=auto:qg=143:00008000
D255:rm=NXXQ9QG:rp=P11111PLD19L255DRAFT$:qt=auto:qg=143:00009000
D257:rm=NXXXQQG:rp=P11111PLD19L257DRAFT$:qt=auto:qg=143:00011000
.. --- gap in data ------------------------------------------------
C783:rm=WXSBQ9QF:rp=P11111PLD19L783$:qt=auto:qg=139:00065000
C545:rm=WXSBQ9Q6:rp=P11111PLD19L545$:qt=auto:qg=133:00066000
C546:rm=WXSBQ9Q6:rp=P11111PLD19L546$:qt=auto:qg=133:00067000
C547:rm=WXSBQ9Q6:rp=P11111PLD19L547$:qt=addd:qg=133:00068000
C548:rm=WXSBQ9Q6:rp=P11111PLD19L548$:qt=asss:qg=133:00069000
C256:rm=WXSBTQ75:rp=P11111PLD19L256$:qt=auto:qg=208:
P221A:lp=P221:sd=L003K.111:qt=text:00071000
P221B:lp=P221:sd=L003K.111:qt=raw:00072000
P301A:lp=P301:sd=L003K.111:qt=text:00073000
P301B:lp=P301:sd=L003K.111:qt=raw:00074000
TRRR:rm=AUxxxbM:rp=TRMS:cl=|writer=%f|jobn=%j:qt=cctl:00075000
The last 8 digits need to be deleted. There may be a line after the colon
Any ideas on what the script will look like?
Is there a way for me to ask within the script.
Run the script.
Then you are prompted to enter the file that needs to be trimmed?
File is entered and the script is run against it and produces a different ouput file.
Thanks for any help that can be given.