BEGIN {
str = "Sorecheck.o"
print str
sub(".o", ".src",str)
print str
}
Output:
Sorecheck.o
.srcrecheck.o
Expected Output:
Sorecheck.o
Sorecheck.src
I wanted to replace ".o" with ".src" but here sub() is omitting "." character while comparing. can some one tell me how to fix this?