#first transformed all spaces into a new line:
sed 'se[[:space:]]e\neg' -i textfile.txt
#Removed all empty lines:
sed '/^$/d' -i textfile.txt
#Then sorted alphabetically and removed duplicates:
cat textfile.txt | sort | uniq > textfile_sorted_uniq.txt
#Text is now in single column format
#Im still left with the entries that had duplicates when all I need is the entries that never had duplicates to begin with.
|