I have a file with list of redundant server names and want only unique ones of those.
I have used following command but still redudant ones are listing
$cat file|sort|uniq
where could be the problem.
Thanks,
Srinivas
I have a file with list of redundant server names and want only unique ones of those.
I have used following command but still redudant ones are listing
$cat file|sort|uniq
where could be the problem.
Thanks,
Srinivas
I workout with your command, It's working fine.
I don't know what error you faced.
give me some inputs.
I realized there were spaces on some lines because of which i didnt get expected result.
I removed with this command and it worked then.
awk '{print $1}' filename|sort|uniq
Thank you for your response.
Thanks,
Srinivas
awk '{a[$1]} END {for(i in a) print i}' filename