Error in replacing special chars using awk
I have a file with following data :
a$cd
e%gh
I am trying to replace the special chars with space.
When I execute the following command these chars are replaced :
awk '{gsub(/[\041-\177]/,"b",$0);print $0}' temp.txt
Result:
abcd
ebgh
But when I execute
awk '{gsub(/[\041-\175]/,"b",$0);print $0}' temp.txt
Result:
a$cd
e%gh
these chars are not replaced.Could someone tell me if I am doing any mistake.
Thanks in advance
|