• 首页

说易事

  • 首页
    • 登陆
  • 首页
  • feed
  • 软件
  • 留言本

shell入门-for循环

  • shell
  • for
shell

test.sh:

#!/bin/sh
for tmp in aa bb cc dd ee
do
    echo $tmp
done

# 只运行一次,直接输出
for tmp in "ff gg hh ii"
do
    echo $tmp
done

输出:

[root@localhost shell]# ./test.sh 
aa
bb
cc
dd
ee
ff gg hh ii


你可能感兴趣的文章

    • go入门-for循环1611 浏览,0 评论
    • shell入门-输出有换行的值2771 浏览,0 评论
    • shell入门-函数1674 浏览,0 评论
    • shell入门-获取目录内所有的文件名1682 浏览,0 评论
    • shell入门-获取文件内容1789 浏览,0 评论

热门文章

  • windows下软链接mklink

    阅读: 9367

  • Win10支持Ubuntu Linux Bash-apache+php+mysql环境搭建

    阅读: 6604

  • python入门-读取文件并记住位置

    阅读: 6173 评论:1

  • springmvc-@DateTimeFormat/@NumberFormat数据格式转换

    阅读: 5700

  • 使用ssh链接windows子系统(Ubuntu)

    阅读: 5236

  • Linux常用命令

    阅读: 5115

网站分类

  • 软件
  • go
  • python
  • shell
  • java
  • hibernate
  • linux
  • 自动化测试
  • 量子计算
  • 数据库
  • PHP
  • 其它

文章归档

  • 2020年11月 (1)
  • 2020年7月 (1)
  • 2020年6月 (1)
  • 2018年9月 (2)
  • 2018年8月 (1)
  • 2018年5月 (2)
  • 2018年4月 (4)
  • 2018年3月 (1)
  • 2018年2月 (1)
  • 2018年1月 (2)
  • 2017年12月 (2)
  • 2017年11月 (1)
  • 2017年10月 (2)
  • 2017年9月 (1)
  • 2017年8月 (6)
  • 2017年7月 (6)
  • 2017年3月 (1)
  • 2017年2月 (3)
  • 2017年1月 (3)
  • 2016年12月 (1)
  • 2016年11月 (2)
  • 2016年10月 (1)
  • 2016年9月 (11)
  • 2016年8月 (12)
  • 2016年7月 (23)
  • 2016年6月 (9)
  • 2016年5月 (26)
  • 2016年4月 (88)
  • 2016年3月 (13)
回顶部
sf-wechat

扫扫关注微信

说易事  桂ICP备16002042号    
Power by Z-blogPHP theme by zblog模板