Thursday 21 May 2015

Write an awk script to delete duplicated line from a text file. The order of the original lines must remain unchanged.VTU MCA UNIX LAB10B

BEGIN{
    FS="\n"
}
   
{
    if(var!=$1 && NR>=0)
    print line
    var=$1
    line=$0
}
END{
    print line
}

No comments:

Post a Comment