Friday, 23 August 2013

what does it means in awk script? `awk -F | '{!a[$1]++}{printf RS $1}{print FS $2}' input.txt`

what does it means in awk script? `awk -F | '{!a[$1]++}{printf RS
$1}{print FS $2}' input.txt`

pI need meaning of below code in unix, and help me go forward../p
precode`awk -F | '{!a[$1]++}{printf RS $1}{print FS $2}' input.txt`
/code/pre pMy sample i/p file is like below /p precode1|Balaji 1|Kumar
3|India 3|China 3|Australia 1|Dinesh /code/pre pI need o/p like below /p
precode1|Balaji|Kumar|Dinesh 3|India|China|Australia /code/pre

No comments:

Post a Comment