Your use of the word 'unique' is ambiguous. Do you want those IP's which occur only once in the input or do you want one copy of each IP that occurs in the input? All of the replies so far assume the latter.
Bill
Comment on Re: grep unique values , remove the blank spaces and store it in a variable