Visit Our UNIX and Linux User Community

Search Results

Search: Posts Made By: Scrutinizer
2,151
Posted By Scrutinizer
Yes that is correct, #3 uses exact strings, so it...
Yes that is correct, #3 uses exact strings, so it correctly identifies the right field, and the sub() in itself isn't the problem either, since iteration occurs over the fields and not over the key...
2,151
Posted By Scrutinizer
Hi, try: awk ' NR==FNR { A[$1]=$2 ...
Hi, try:
awk '
NR==FNR {
A[$1]=$2
next
}
{
for(i=1; i<=NF; i++)
if($i in A)
sub($i,A[$i])
print
}
' FS="=" file2 FS='[(/,]' file1
Showing results 1 to 2 of 2

 

Featured Tech Videos

All times are GMT -4. The time now is 10:01 PM.
Unix & Linux Forums Content Copyright 1993-2020. All Rights Reserved.
Privacy Policy