shell-002 while
来源:互联网 发布:php 调用迅雷 编辑:程序博客网 时间:2024/05/22 05:33
0
#!/bin/bashi=1while ((i<20))do ((i=i+1))doneecho $i
1. baby_rocker.sh
baby_rocker.sh#!/bin/bashwhile [ 1=1 ]do eject eject -t done
2. repeat.sh
#!/bin/bashdeclare -i i=0declare -i MAX=1000while ((i<MAX))do cat source.txt >> input.txt let i++doneecho "i=$i"exit 0
3. 读文件,一次读一行,并打印
#!/bin/bashwhile read linedo echo $linedone < input.txt
4. 循环读/etc/passwd,并分析出以:隔离的字段
#!/bin/bashIFS=':'cat /etc/passwd | {while read f1 f2 f3 f4 f5 f6 f7do echo "username: $f1, login shell: $f7"done}
5
#!/bin/bashfoo=1while [ "$foo" -le 20 ]; do echo "once again" foo=$(($foo+1))doneecho "foo=$foo" exit 0
6 simplest
#!/bin/bashwhile [ 1 = 1 ]do echo "haha" echo "hehe"done
- shell-002 while
- shell-while
- shell ---while
- while语句–shell
- bash shell while语法
- shell while循环监控
- do-while in Shell
- for&while loop/shell
- linux shell ----while Loop
- shell语法while
- shell脚本:while语句
- shell脚本----while循环
- shell脚本--while循环
- shell while循环
- shell while循环问题
- shell while do编程
- shell find->while
- Shell中的while循环
- C#Socket 异步代码示例
- ios, iphone , objective C 随机数
- PL/SQL函数和触发器
- 深度探索C++对象模型系列笔记之第一章:关于对象
- BS与CS 模式的区别
- shell-002 while
- Android项目源码
- POJ 2348 博弈论
- TIME_WAIT状态的作用
- mysql5.1数据库卸载
- 关于数据集成方面的JMS组件可以使了
- 使用ALAssertLibrary获取系统相册
- iphone开发:关于触屏事件的一些操作
- socket 编程