for DEMO
2024-09-17 07:53:35
举例一:
[xiluhua@vm-xiluhua][~/shell_script]$ cat forDemo1.sh
#=======================================================================================
#/bin/bash
#auth: xiluhua
#date:
#desc: print file list in a directory
#======================================================================================= [ -z $ ] && echo "exception@1: directory can not be null" && exit echo "prompt: print file list in a directory ..."
for file in $(ls $/*.123)
do
echo $file
done
exit 0
举例二:
[xiluhua@vm-xiluhua][~/shell_script]$ cat forDemo2.sh
#=======================================================================================
#/bin/bash
#auth: xiluhua
#date:
#desc: print triangle with *
#======================================================================================= for (( i=; i<; i++ ))
do
let space=-$i
#echo $space
for (( j=; j<${space}; j++ ))
do
printf " "
done let star=*$i+
for (( k=; k<$star; k++ ))
do
printf "*"
done echo ""
done
最新文章
- spring-mvc注解(mvc:annotation-driver,JSON,配置详解)
- vue学习之旅
- hdu1561 The more, The Better (树形dp+背包)
- 希望早几年知道的5个Unix命令
- Python 字典(Dictionary) get()方法
- 高效使用Bitmaps(二) 后台加载Bitmap
- jquery1.9学习笔记 之选择器(基本元素一)
- php修改配置文件php.ini设置文件上传大小讲解
- Grid++Report 报表开发工具
- 基于HTTP协议下载文件的实现
- cocos2d-x 颜色
- [转]Introduction to Core Bluetooth: Building a Heart Rate Monitor
- 7.ReadWriteLock接口及其实现ReentrantReadWriteLock
- $PkuWc\ 2018$ 酱油记
- CarbonData-1:common
- 单元测试-unittest
- CTF的一道安卓逆向
- 【快捷键】IntelliJ IDEA For Mac 常用快捷键
- STATA一小步 我的一大步
- ibatis (mybatis) for循环拼接语句【转】