K
khan
Hi,
I have a requirement where i need to edit the file, based on some
tokens.
My requirement is something like this:
1. If token1 is found delete that line from the file.
2. If token2 is found replace some part of that line with replacement
string.
3. If token3 is found delete that line and next line in the file.
I wrote a script to do this, but since file-pointer is moved after
reading it is not editing the file at correct positions.
Please let me know a solution.
Thanks,
-Mushtaq Khan
I have a requirement where i need to edit the file, based on some
tokens.
My requirement is something like this:
1. If token1 is found delete that line from the file.
2. If token2 is found replace some part of that line with replacement
string.
3. If token3 is found delete that line and next line in the file.
I wrote a script to do this, but since file-pointer is moved after
reading it is not editing the file at correct positions.
Please let me know a solution.
Thanks,
-Mushtaq Khan