
I have a file.txt with lists on each row such as:
Code: Select all
{pubm hello} {0 0}
{pubm hi} {0 0}
{pubm well} {pubm ok} {0 0}
{pubm hi} {0 0}
to
{pubm hi} {1 0}
and still keep all above and below lines intact.
I figured out that I will:
set var [gets {pubm hi} {0 0}]
then change the var to {pubm hi} {1 0}
but then to write it i don't know! because puts will either write at the end of the file or delete all data in the file. but i want to delete that one line and replace it with a new. however it's not that important to rewrite the new line on the same line number, as long as the script won't make extra line breaks.
this file.txt might become several MB big so I would also know if there are some restrictions like if I have to put all text after {pubm hi} {0 0} in a variable, then how much text does a variable fit?