cat.sh 345 Bytes
Newer Older
sunzhq2's avatar
sunzhq2 committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash

if [ "$#" -ne 3 ]; then
    echo "错误:请输入两个文件名作为参数。"
    exit 1
fi

log_file1="$1"
log_file2="$2"
log_file3="$3"

cat "$log_file1" | grep "./bin/MIOpenDriver" | sort -n | uniq -c > "$log_file2"

cat "$log_file1" | grep "./rocblas-bench -f gemm" | sort -n | uniq -c > "$log_file3"

echo "操作完成"