arch1.txt arch2.txt
--------- ---------
Juan Perez 1711089378 22 H
Ana Lopez 0976324852 25 M
If you execute the following, it will show you the result you want
awk 'NR==FNR{a[NR]=$0;next}{print a[FNR],$2}' arch1.txt arch2.txt
Juan Perez 22
Ana Lopez 25
NR
Give the total number of records processed
FNR
Give the total number of records for each file
{a[NR]=$0;next}
fills matrix a
with records processed from file arch1.txt
next
causes awk to stop processing the current file and move to the next file in this case arch2.txt
{print a[FNR],$2}
prints the results adding the word or text found in the field $2
of the file arch2.txt
which in this case is the age
Awk Built-in Variables
To save the result obtained in arch1.txt
you can use a third file let's say output.txt
to store these results and then move them to arch1.txt
awk 'NR==FNR{a[NR]=$0;next}{print a[FNR],$2}' arch1.txt arch2.txt > output.txt && mv output.txt arch1.txt
Then you can look at the content of arch1.txt
and you will have the result you want
$ cat arch1.txt
Juan Perez 22
Ana Lopez 25