Il awkcomando seguente rimuove tutte le righe duplicate come spiegato qui :
awk '!seen[$0]++'
Se il testo contiene righe vuote, verranno eliminate tutte le righe tranne una.
Come posso mantenere tutte le righe vuote eliminando tutte le righe duplicate non vuote, usando solo awk? Per favore, includi anche una breve spiegazione.