how to use gsub function awk to replace characters with empty value
772
for example my value alpha_1_2_u_345_cd.csv then i want to remove the characters present in using gsub in awk
output should be
12345,alpha_1_2_u_345_cd.csv
please let me know if there any evaluation to be done
Posted by @manatwork
{sub(/r.*/,"",$2); gsub(/[^[:digit:]]/,"",$2); print $2"|"$3"|"$4"|"$5}.
Or the gensub() way: