<p>Hello,</p><p>I have never made a script in my life. </p>

<p>The ploblem is how to change the fasta names like this input file:</p>

<pre><code>&gt;Glyma04g14800|Glyma04g14800.3
MMLETVAAVPGMVAGMLLHCKSLRRFEHSGGWIKALLEEAENERMHLMTFMEVAKPKWYE
&gt;Glyma05g24460|Glyma05g24460.1
SNVSIDLTKHHVPKNFLDKVAYRTVKLLRIPTDLFFKRRYGCRAMMLETVAAVPGMVGGM
</code></pre>

<p>in this output file (change original names to numbers  in ascending order, starting with 1):</p>

<pre><code>&gt;1
MMLETVAAVPGMVAGMLLHCKSLRRFEHSGGWIKALLEEAENERMHLMTFMEVAKPKWYE
&gt;2
SNVSIDLTKHHVPKNFLDKVAYRTVKLLRIPTDLFFKRRYGCRAMMLETVAAVPGMVGGM
</code></pre>

<p>I'm so grateful for helping.
Regards,
Naka</p>

    awk '/^>/{print ">" ++i; next}{print}' < file.fasta