首页 > shell > shell集合计算命令uniq用法

shell集合计算命令uniq用法

1、取file1 file2的并集

cat  file1 file2 |sort  -u |uniq

2、取file1 file2的交集

cat file1 file2|sort -u |uniq -d

3、去掉file1 file2的交集

cat file1 file2|sort -u |uniq -u

  1. 还没有评论
评论提交中, 请稍候...

留言

请输入正确的验证码

可以使用的标签: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>
Trackbacks & Pingbacks ( 0 )
  1. 还没有 trackbacks