I want to use a loop while creating a new file where each new line is created by one/single step: some text, then quoted step number, and then something else. I started with this code, but it does not work:
gawk '
{
for (i = 1; i <= 1000; i++)
print "begin\""i"\"text"i"end" # how to print a line break?
>> "path/to/output.txt"
}'
so I want to see
output.txt:
begin"1"text1end
...
begin"1000"text1000end
Please, help to solve this.
The code needs to be placed inside of
BEGIN
block: