linux命令---查找文件中的内容 [yang@localhost ~]$ cat 1.txt |egrep '123456789|second'-------匹配123456789或者second的行 first line:123456789012345678901234567890123456789012345678901234567890 second line:one two three four five six seven eight nine ten [yang@localh…
读取文件,每行拆分,并比较拆分数组长度 #!/bin/bash FILENAME=./.txt function While_read_LINE(){ cat $FILENAME | while read LINE do str=$LINE OLD_IFS="$IFS" IFS=";" arr=($str) IFS="$OLD_IFS" lineLen=${#arr[@]} minLen= if [ $lineLen -le $minLen ];…