awk script syntax issue

classic Classic list List threaded Threaded
1 message Options
kev
Reply | Threaded
Open this post in threaded view
|

awk script syntax issue

kev
test.csv contains
1,cab

output should be
1,zxy

awk 'BEGIN {FS = "~"}; {print $1,",",$2| tr "[abc]" "[xyz]"}' test.csv > out.csv

this command works   how to integrate the same in awk
echo cab | tr "[abc]" "[xyz]" returns zxy

Thanks