in reply to OT: Find unique values in a column

This is a FAQ.
echo 'DATA_ARCHIVE BDAT - - BG - + sas DATA_CORP BDAC - Y BG bg sas DAATA_ARCHIVE BDAA - - BG - hado +op DATA_CONS BDAC - - BG - hado +op DATA_APPS BDAP - - BG ba misc DATA_HISTORY BDAH - - BG - hado +op' \ | perl -lane 'print $F[6] if ! $seen{ $F[6] }++'

($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,

Replies are listed 'Best First'.
Re^2: OT: Find unique values in a column
by rahulme81 (Sexton) on Nov 30, 2015 at 15:32 UTC
    thank you !!! Is there any other way I can achieve with awk or unix one liner commands?
      Of course, but you don't ask for awk or unix in a Perl forum, do you?
      ... | rev | cut -f1 -d' ' | rev | sort -u
      ($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,
      Is there any other way I can achieve with awk or unix one liner commands?

      Well,

      perl -lane 'print $F[6] if ! $seen{ $F[6] }++' file.txt
      is sort of a Unix one-liner, isn't it?  ;-)