Awk commands for changing letters in a file with multiple outputs : <p>I have an input file which looks like this:</p>

<pre><code>input.txt

THISISANEXAMPLEOFANINPUTFILEWITHALONGSTRINGOFTEXT
</code></pre>

<p>I have another file with positions of letters i want to change and the letter i want to change it to, such as this:</p>

<pre><code>textpos.txt

Position    Text_Change
1           A
2           B
3           X
</code></pre>

<p>(Actually there will be about 10,000 alphabet changes)</p>

<p>And I would like one separate output file for each text change, which should look like this:</p>

<pre><code>output1.txt

AHISISANEXAMPLEOFANINPUTFILEWITHALONGSTRINGOFTEXT
</code></pre>

<p>Next one:</p>

<pre><code>output2.txt

TBISISANEXAMPLEOFANINPUTFILEWITHALONGSTRINGOFTEXT
</code></pre>

<p>Next one: </p>

<pre><code>output3.txt

THXSISANEXAMPLEOFANINPUTFILEWITHALONGSTRINGOFTEXT
</code></pre>

<p>I would like to learn how to do this in an awk command and a pythonic way as well, and was wondering what would be the best and quickest way to do this?</p>

<p>Thanks in advance.</p>
