Need to increment number in data file

Hello,

I have an Excel spreadsheet with the following data:

 
Refntns3_1  char         30 Ref H77 nt codon 1      Reference H77 Nucleotide Codon 1                                             --
Codns3_1    char         30 Obs Nucleotides codon 1 Observed Nucleotides Codon 1                                                 --
Refaans3_1  char         30 Ref  H77 aa codon 1     Reference H77 Amino Acid Codon 1                                             --
Ns3_1       char         30 Obs Amino acid codon 1  Observed Amino Acid Codon 1                                                  --
Mutns3_1    char         30 Ref/Obs aa 1 (b_codes)  Reference and Observed Amino Acid Codon 1 (see mut in b_codes)               --
Synns3_1    int/value     3 Syn codon 1 (b_codes)   Synonymity Code Codon 1 (see syn in b_codes)                    -2:4         --
Aamixns3_1  int/value     3 Mix codon 1 (b_codes)   Mixture/Mutation Code Codon 1 (see aamix in b_codes)            -2:4         --
 

For the 1,4 and 5 fields - I need to increment the number 1 to the next number up to 100. I have several workbooks where I need to do this - over 7000 entries. I would like to edit this data file - increment the numbers - then copy it all back in.

Let me know if there is a shell, sed, awk or perl script that will do this.

Thank you !
Deneuve01

Can you please post a delimited data, may be CSV. I don't think anybody in this forum will be able to distinguish the fields without a proper delimiter.

---------- Post updated at 11:50 ---------- Previous update was at 11:46 ----------

With code tags enabled, it looks much better. Thank you.

Here is the data with pipe delimiters so you can clearly identify the fields I am referencing:

 
|Refntns3_1 |char         |30 |Ref H77 nt codon 1      |Reference H77 Nucleotide Codon 1                                |             |--
|Codns3_1   |char         |30 |Obs Nucleotides codon 1 |Observed Nucleotides Codon 1                                    |             |--
|Refaans3_1 |char         |30 |Ref  H77 aa codon 1     |Reference H77 Amino Acid Codon 1                                |             |--
|Ns3_1      |char         |30 |Obs Amino acid codon 1  |Observed Amino Acid Codon 1                                     |             |--
|Mutns3_1   |char         |30 |Ref/Obs aa 1 (b_codes)  |Reference and Observed Amino Acid Codon 1 (see mut in b_codes)  |             |--
|Synns3_1   |int/value    | 3 |Syn codon 1 (b_codes)   |Synonymity Code Codon 1 (see syn in b_codes)                    |-2:4         |--
|Aamixns3_1 |int/value    | 3 |Mix codon 1 (b_codes)   |Mixture/Mutation Code Codon 1 (see aamix in b_codes)            |-2:4         |--
 
 

---------- Post updated at 04:10 PM ---------- Previous update was at 01:11 PM ----------

I figured the solution out myself and wrote a simple shell script to create the interation I needed.

#!/bin/csh
rm -f test1.txt
touch test1.txt
foreach X (`cat num`)
echo "| |refntns3_"$X" |Ref H77 nt codon "$X"      |Reference H77 Nucleotide Codon "$X"                                |6 |30 |0 |0 |  |">>test1.txt
echo "| |codns3_"$X"   |Obs Nucleotides codon "$X" |Observed Nucleotides Codon "$X"                                    |6 |30 |0 |0 |  |">>test1.txt
echo "| |refaans3_"$X" |Ref  H77 aa codon "$X"     |Reference H77 Amino Acid Codon "$X"                                |6 |30 |0 |0 |  |">>test1.txt
echo "| |ns3_"$X"      |Obs Amino acid codon "$X"  |Observed Amino Acid Codon "$X"                                     |6 |30 |0 |0 |  |">>test1.txt
echo "| |mutns3_"$X"   |Ref/Obs aa "$X" (b_codes)  |Reference and Observed Amino Acid Codon "$X" (see mut in b_codes)  |6 |30 |0 |0 |  |">>test1.txt
echo "| |synns3_"$X"   |Syn codon "$X" (b_codes)   |Synonymity Code Codon "$X" (see syn in b_codes)                    |2 |3  |0 |0 |-2:4 |">>test1.txt
echo "| |aamixns3_"$X" |Mix codon "$X" (b_codes)   |Mixture/Mutation Code Codon "$X" (see aamix in b_codes)            |2 |3 |0 |0 |-2:4  |">>test1.txt
end
exit

** the num file contains a simple list of numbers, 1-100
 

Thank you!