I wish to print out the unique users in the system using only sed, using:ls -la | sed '/^$USER$/p'.... It gives me all files, matching to the current user, and prints out the lines they are in. Meaning it prints out all lines with all users. 
How can I use sed to print out unique users
bash;sed
If you want to list all the users, that own a file in the current directory, you can use this command:ls -la | tr -s ' ' | cut -f3 -d ' ' | sort | uniqIt lists all the files with ls -la, then collapses the multiple spaces into single ones with tr -s ' ', so we can use cut -d ' ' -f3 to get the 3rd column of the output. -d ' ' gives the delimiter and -f3 the 3rd field.Then we sort the list of users (the 3rd column) with sort and remove all neighbouring duplicate entries with uniq.If you want to get a list of all users on your current system, you should take a look at this answer by Nykakin.