shell实现传入多个身份证号输出出生年月并且计算年龄
#!/bin/bash
if [ $# -eq 0 ];
then
echo"The number of incoming parameters cannot be 0"
fi
for i in $*
do
birth=$i
thisyear=`date +%Y`
age=`expr $thisyear - ${birth:6:4}`
echo ${birt...
原创
2018-09-27 19:29:48 ·
1024 阅读 ·
0 评论