feherke,
I'm still having issues skipping the first column
{for ( i in a ) !/^\// && gsub(i,a[i])} didn't work.
I want to skip the first column but substitue all remaining columns... can't get it working.
awk 'NR==FNR {a[$1]=$2;next} {for ( i in a) gsub(i,a[i],!$1); printf $1}1'
awk 'NR==FNR...
Thank you feherke!
One more question, now if I only want to substitute the 4th field of the data.txt file (ignore the first 3 fields), then where would I tell it to check only the 4th field (or ignore the first 3 fields)?
Hello awk experts, I want to substitute the data.txt file according to the template.txt file rules:
template.txt contains the following:
hello hola
one uno
two dos
three tre
four quatro
...
...
goodbye adios
data.txt contains the following:
hello my name is David
one of my friends are John...
Hello awk experts, I need help with writing an awk script for the following task:
I have a 10 files full of values (8 fixed size columns), and I want to average out the values from each field from all of the input files.
Here are the values from 1 of 10 files (other 9 files have same fields...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.