您的位置:首页 > 运维架构 > Shell

使用shell中数组功能生成自己的手机号

2020-02-29 22:39 411 查看
[root@crushlinux ~]# cat shoujihao.sh
#!/bin/bash
# Crushlinux
# 2017-04-20
# Description:My Tel

a=(1 3 6 5 0 2 8 9 )
b=(0 1 2 3 0 4 5 6 7 1 1)
for i in ${b[@]};do
echo -e "${a[$i]}\c"
done
echo

[root@crushlinux ~]# bash shoujihao.sh 13951028933

  

转载于:https://www.cnblogs.com/crushlinux/p/6738262.html

  • 点赞
  • 收藏
  • 分享
  • 文章举报
diaoweishen9893 发布了0 篇原创文章 · 获赞 0 · 访问量 294 私信 关注
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐