Skip to content

Instantly share code, notes, and snippets.

@rishiag
Last active May 9, 2019 17:21
Show Gist options
  • Select an option

  • Save rishiag/8744e2b4faf348eb2facc40fabdccf15 to your computer and use it in GitHub Desktop.

Select an option

Save rishiag/8744e2b4faf348eb2facc40fabdccf15 to your computer and use it in GitHub Desktop.
{
nsrc=split($3,a,".")
ndst=split($5,b,".")
for (i=1;i<nsrc;i++)
{
strsrc=strsrc"."a[i]
}
for (j=1;j<ndst;j++)
{
strdst=strdst"."b[j]
}
print substr(strsrc,2),substr(strdst,2)
strsrc=""
strdst=""
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment