Hello, can someone advice me how i can make correct to add new value string in text file at specific location.
I will give full example
So let's start i have a file File1.txt
Inside i have this information:
Line1: /grant Username2
OI)(CI)F /T
Line2: /GRANT:Username2,Full /UNLIMITED
so what i want to do programatically, in Line 1 i want to add after /T new record string
example result will be:
Code:
/grant Username2:(OI)(CI)F /T /grant Username3:(OI)(CI)F /T
then for line 2 i want to add before the /UNLIMITED new string
example result will be:
/GRANT:Username2,Full /GRANT:Username3,Full /UNLIMITED
how i can make it like that? - Please note Username are just example text it can be other text
And for example how can i add new line in the end with string after line2, to add new strings each line if i need?