Skip to content

Instantly share code, notes, and snippets.

@sipadan2003
Created March 10, 2020 09:34
Show Gist options
  • Save sipadan2003/444a73c993540309ff82326d29e690b6 to your computer and use it in GitHub Desktop.
Save sipadan2003/444a73c993540309ff82326d29e690b6 to your computer and use it in GitHub Desktop.
BEGIN { FS="\t" }
{
for (i=2;i<=NF;i++){
if(i == NF){
printf "%s\n", replaceToDummy($i)
} else {
printf "%s\t", replaceToDummy($i)
}
}
}
function replaceToDummy(col)
{
if(col=="" || col~"n.d" || col~"nd" || col~"tr" || col~"<" || col~">"){
return "-99999."
}
return col
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment