Hi,
I would like to cut a specific line from a text file and then manipulate the text in that line.
For eg. below is "tmp" file.
-----------------
Tue 07/05/05 00:27:34.333
Tue 07/05/05 00:27:34.333 4 events were processed for customer 315 and will be correctly resolved when 315MERGE is run:
Tue 07/05/05 00:27:34.333 ISA ContainerID Event
Tue 07/05/05 00:27:34.333 000005225 PONU178050 VD
Tue 07/05/05 00:27:34.333 000005225 PONU178050 AE
Tue 07/05/05 00:27:34.333 000005225 PONU738873 VD
Tue 07/05/05 00:27:34.333 000005225 PONU738873 AE
------------------
In the above file, I am able to get the line no (line no: 2) of the searching string "events were processed for customer", then I would like to cut the lines in the file starting from 3rd line.
Below is my script:
------------------
#!/bin/ksh
nm=`grep -n "events were processed for customer" tmp |cut -c1-2`
echo $nm
Can anybody help me in this.
cheers,
dhiman.
Edit - ZB - Font still to large.... removed superflous SIZE tags...