删除重复的条目 [英] Remove duplicate entries

查看:78
本文介绍了删除重复的条目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好



我正在运行一个unix命令,它给我以下输出,我将其存储在一个字符串中



,root,appdet,patrol,invscout,trnadm,da003sc,vendabe,sshd,webmd,webm,we002za,tr005ma,r3xadm,qa1adm,r3qadm,kwdadm,best1, LDAP,IPSEC大师,appdet,di003bo,sh506pa,su004sa,nex5ovt,nex46cd,nex8bth,BMCAudit,ve001na,nex3mzn,nex3slw,nex3orp,nex87vj,nex7uxw,nex7geg,nex7lmw,nex3hxf,nex8fas,根,仓,根,垃圾桶, SYS,垃圾桶,ADM,nuucp,UUCP ,,根,根,LP,根本没人,,,LPD,客人,,,根,LP,printq,imnadm,r3dadm,orar3d,d46adm,准确,pr1adm,csadm,su004sa, 





 $ ResultOfMasterListUser = Get-Content$ LocalUserListFileLocation\ $ LocalUserList





现在我想从字符串中删除重复项。



请告诉我怎么样这样做。



谢谢

解决方案

ResultOfMasterListUser = Get-Content

LocalUserListFileLocation \


LocalUserList





现在我想从字符串中删除重复项。



请告诉我怎么做。



谢谢你


Hi All

I am running a unix command which is giving me the below output which i am storing in a string

,root,appdet,patrol,invscout,trnadm,da003sc,vendabe,sshd,webmd,webm,we002za,tr005ma,r3xadm,qa1adm,r3qadm,kwdadm,best1,ldap,ipsec,maestro,appdet,di003bo,sh506pa,su004sa,nex5ovt,nex46cd,nex8bth,BMCAudit,ve001na,nex3mzn,nex3slw,nex3orp,nex87vj,nex7uxw,nex7geg,nex7lmw,nex3hxf,nex8fas,root,bin,root,bin,sys,bin,adm,nuucp,uucp,,root,root,lp,root,,nobody,lpd,guest,,,root,lp,printq,imnadm,r3dadm,orar3d,d46adm,precise,pr1adm,csadm,su004sa,



$ResultOfMasterListUser = Get-Content "$LocalUserListFileLocation\$LocalUserList"



Now i want to remove the duplicates from the string.

Please tell me how to do this.

Thank you

解决方案

ResultOfMasterListUser = Get-Content "


LocalUserListFileLocation\


LocalUserList"



Now i want to remove the duplicates from the string.

Please tell me how to do this.

Thank you


这篇关于删除重复的条目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆