jeudi 28 juillet 2016

Create a mapping from a file in awk or shell script or python

I have a file which contains airport code like below

ATQ 
HYD 
BLR
GOI 
AMD
CCJ
TRV

from the same file i have to create source destination mapping like below in gawk.

 src dest
 ATQ HYD
 ATQ BLR
 ATQ GOI
 ATQ AMD
 ATQ CCJ
 ATQ TRV
 HYD ATQ
 HYD BLR
 HYD AMD
 ....
 ...

can anyone help me here,thanks in advance

Aucun commentaire:

Enregistrer un commentaire