题解 | #统计文件的行数#
统计文件的行数
https://www.nowcoder.com/practice/205ccba30b264ae697a78f425f276779
#!/bin/bash
arr=()
index=0
read context
while [[ $context != "" ]] ;do
arr[$index]=$context
let index=index+1
read context
done
echo ${#arr[*]}
exit 0

CVTE公司福利 714人发布