Here is one that I came up with:
PATH=`awk -F: ‘{for(i=1;i<=NF;i++){if(!($i in a)){a[$i];printf s$i;s=":"}}}'<<<$PATH`
continuation from "Fox hole", "I wonder…", and "且如是言"
Here is one that I came up with:
PATH=`awk -F: ‘{for(i=1;i<=NF;i++){if(!($i in a)){a[$i];printf s$i;s=":"}}}'<<<$PATH`
nice. we made the same, but in perl
http://linsovet.com/perl-1liner-remove-duplicate-from-PATH