linux shell---if condition
来源:互联网 发布:淘宝一伍一拾 编辑:程序博客网 时间:2024/06/10 23:53
Syntax:
if conditionthencommand1 if condition is true or if exit statusof condition is 0 (zero)...... fi
if given condition is true then command1 is executed
For compression you can use test or [ expr ] statements or even exist status can be also used.
eg.
#!/bin/bash
#
#Script to print file
#
if cat $1
then
echo -e "\n\nFile $1, found and successfully echoed"
fi
$0执行shell的时候表示的是shell name,$1表示执行shell时候传递的第一个参数,依次类推。$#表示执行shell的时候传递的参数的个数。
- linux shell---if condition
- shell script if condition
- shell linux if
- linux shell if
- linux shell if
- linux shell if 参数
- linux shell if 参数
- linux shell if 参数
- linux shell if 简介
- linux shell if 参数
- linux shell if 参数
- Linux shell if参数
- linux shell if 总结
- linux shell if 参数
- linux shell if 参数
- linux shell if 参数
- linux shell if
- linux shell if 参数
- R编辑器Rstudio学习笔记——基本功能与操作
- 对LoadLibrary和GetModuleHandle的一些东西
- 马云布局大阿里蓝图:美好但需跋涉
- openSUSE U盘 windows,windows上用U盘安装openSUSE
- 图图片
- linux shell---if condition
- 秒杀多线程第十一篇 读者写者问题续 读写锁SRWLock
- 父母
- github
- 常用的一些代码
- uva 11021-Tribbles-全概率
- rac oracle single nodes
- 杭电Acm1001解决求和的问题
- c语言中函数返回局部变量的指针(一些容易犯错的地方)