#!/bin/bash
for w in $(cat w.txt)
do
length=`echo ${#w}`
c=0
for((i=1;i<=$length;i++))
do
b=$(echo "$w" |cut -b "$i")
if [[ $b =~ [0-9] ]];then
let c++
fi
done
if [ $c -eq 1 ];then
echo $w
fi
done
03-19
231
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)