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
Please find the execution below
91 Answer
Posted by @manatwork
{sub(/r.*/,"",$2); gsub(/[^[:digit:]]/,"",$2); print $2"|"$3"|"$4"|"$5}.
Or the gensub() way:
{print gensub(/[^[:digit:]]/,"","g",gensub(/r.*/,"",1,$2))"|"$3"|"$4"|"$5}