去重sort|uniq -d
#!/bin/bash
###############################################################
#Author :Bing #
#Create Time:11/26/2019 #
###############################################################
awk '{if(NR%2==0) {print($1)}}' vendor_serial_num.log > temp.log #隔行打印到log
row=`sort temp.log|uniq -d` #-d表示仅显示重复行,-u仅显示不重复行
echo $row
if [[ -z "$row" ]];then #判断重复行变量row是否为空,=0表示true
echo -e "this test..................\033[5;1;31m [PASS] \033[0m".
else
echo -e "this test ..................\033[31m:5m [FAIL] \033[0m".
echo
fi
去重sort|uniq -d的更多相关文章
- 使用sort,uniq去重并统计出现次数
测试文档test 1 2 3 4 1 2 1 1 sort把相同的放在一起 [root@salt-test ~]# sort test 1 1 1 1 2 2 3 4 uniq -c统计出现的次数 [ ...
- linux sort,uniq,cut,wc.
文章转自 http://www.cnblogs.com/ggjucheng/archive/2013/01/13/2858385.html sort sort 命令对 File 参数指定的文件中的行排 ...
- [转]linux sort,uniq,cut,wc命令详解
sort sort 命令对 File 参数指定的文件中的行排序,并将结果写到标准输出.如果 File 参数指定多个文件,那么 sort 命令将这些文件连接起来,并当作一个文件进行排序. sort语法 ...
- linux sort,uniq,cut,wc命令详解
linux sort,uniq,cut,wc命令详解 sort sort 命令对 File 参数指定的文件中的行排序,并将结果写到标准输出.如果 File 参数指定多个文件,那么 sort 命令将这些 ...
- linux sort,uniq,cut,wc,tr命令详解
sort是在Linux里非常常用的一个命令,对指定文件进行排序.去除重复的行 sort 命令对 File 参数指定的文件中的行排序,并将结果写到标准输出.如果 File 参数指定多个文件,那么 sor ...
- Linux之 sort,uniq,cut,wc命令详解
sort sort 命令对 File 参数指定的文件中的行排序,并将结果写到标准输出.如果 File 参数指定多个文件,那么 sort 命令将这些文件连接起来,并当作一个文件进行排序. sort语法 ...
- Ubuntu 14.10 下sort,uniq,cut,wc命令详解
sort sort 命令对 File 参数指定的文件中的行排序,并将结果写到标准输出.如果 File 参数指定多个文件,那么 sort 命令将这些文件连接起来,并当作一个文件进行排序. sort语法 ...
- linux sort,uniq,cut,wc命令详解 (转)
sort sort 命令对 File 参数指定的文件中的行排序,并将结果写到标准输出.如果 File 参数指定多个文件,那么 sort 命令将这些文件连接起来,并当作一个文件进行排序. sort语法 ...
- Linux sort uniq 命令。简单运用
-n #代表以数字方法排序,如果倒序加上-r -t ':' #-t指定分隔符-k ...
随机推荐
- ubuntu12.04安装Opencv2.4.9
之前在Linux下装过几次opencv,但几乎每次都要查一下怎么安装,这次索性记录一下安装过程,不用每次都看其他人的教程了. 至于安装过程,可以直接参考官方文档.在解压后的文件夹下opencv\bui ...
- nginx.conf nginx反向代理配置文件
nginx反向代理配置文件 nginx.conf proxy_default.conf proxy.conf vhost/*.conf upstream/*.conf cache/*.conf ngi ...
- Innovus 对multibit 的支持
如果在综合阶段没有做multibit merge, 或综合阶段由于缺失物理信息multibit cell merge 不合理,那就需要PR 工具做multibit merge 或split. Inno ...
- weinre 真机调试
1.在任意文件夹 安装weinre cnpm -g install weinre 2.启动 weinre --httpPort 8009 --boundHost -all- 3.在你的页面中加入 本机 ...
- queue的使用-Hdu 1702
ACboy needs your help again! Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K ( ...
- [C/C++] 只允许程序运行一个实例
原理是创建一个内核对象之后 如果再创建一个同名的对象 就会给代码中的GetLastError函数对应的变量修改为 ERROR_ALREADY_EXISTS (但是不影响"创建"对象 ...
- Clausen Functions (and related series, functions, integrals)
Since the Clausen functions are intimately related to a number of other important special functions, ...
- 吴裕雄 python 神经网络——TensorFlow实现搭建基础神经网络
import numpy as np import tensorflow as tf import matplotlib.pyplot as plt def add_layer(inputs, in_ ...
- robot用例执行常用命令
执行命令 执行一个用例 robot -t “testcase_name“ data_test.robot 按用例文件执行 robot data_test.robot或者 robot --suite “ ...
- Linux编程日常错误
编译的时候出现如下错误提示: undefined reference to `sem_init'undefined reference to `sem_post'undefined reference ...