How to remove duplicate entries before redirect to file

Published: 8/01/2020
How to remove duplicate entries before redirect to file
Source: UNIX.STACKEXCHANGE.COM

I have seen command "uniq" to remove duplicate entries in file but My purpose is to remove duplicate output before saving in file #!/bin/sh echo "aaa" echo "bbb" echo "aaa" echo "aaa" echo "bbb" echo "ccc" I want to the output to be aaa bbb ccc and then redirect to text file Is it possible to do this way? Thank you.

Read more
Related news
Comment
FACEBOOK