Advertisement

grep练习

阅读量:

grep命令的实践操作

复制代码
    grep ‘error’ vcs_run.log
    grep -n ‘error’ vcs_run.log
    grep -n ‘error’ vcs_run.log > clk.log
    grep -c ‘error’ vcs_run.log
    find ./ -name "*.*" | xargs grep "DENALI_CHI_SIZE_UNSET"
    
    
    AI写代码powershell
复制代码
    sleep 3
    echo ------------abstract start-------------------
    cat ../log/vcs_run.log | grep -n -E 'Error|Warning'
    
    echo -n "total error number: "
    cat ../log/vcs_run.log | grep -c -E 'Error'
    
    echo -n "total warning number: "
    cat ../log/vcs_run.log | grep -c -E 'Warning'
    
    echo ------------abstract end-------

全部评论 (0)

还没有任何评论哟~