Sort differences

I have a file that contains

/home
/opt
/stand
/var
/usr
/tmp
/opt
/home

I need to print the lines that are unique so the output would be

/stand
/var
/usr
/tmp

and omit any filesystems that are duplicates. I searched the forums but did not find anything, although i searched on diff and comm and their must be a simlar problem out there. If anyone has a solution or a link to another thread it woudl be appreciated. It is an HP-UX system with only a posix shell.

Sean

See if this would do for you:

sort input_file | uniq -u

That command worked great, i have never used the uniq command before but it was just what i was looking for thank you.

awk '
  { ++x[$0] }
  END { for (v in x) if ( x[v] == 1 ) print v }
' FILE

A POSIX shell is more than adequate for the vast majority of shell scripting tasks.