linux shell 常用
来源:互联网 发布:知乎 量化分析师 招聘 编辑:程序博客网 时间:2024/06/07 10:53
shell分为命令行与shell 脚本,我们在terminal中打入的为shell命令行,在.sh文件中打入的为shell脚本
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
上面这句话,DIR为该脚本的完整目录
可以用 echo $DIR 将其打印出来
shell脚本中 与if对应的为fi,fi表示if字段的结束
if
条件
then
Command1
[
else
Command2]
#中括号表示else语句可以没有
fi
#别忘了这个结尾
linux中for in 语句
for in 流程控制
语法:
for 变量 in 字符串列表
do
语句
done
阅读全文
0 0
- Linux Shell常用技巧
- Linux常用shell命令
- Linux常用shell命令
- linux SHELL常用技巧
- linux shell常用快捷键
- linux shell常用快捷键
- Linux常用shell快捷键
- Linux Shell 常用快捷键
- Linux Shell常用技巧
- Linux Shell常用技巧
- Linux Shell常用技巧
- Linux Shell常用技巧
- Linux shell 常用技巧
- Linux常用Shell命令
- linux常用shell脚本
- Linux 常用Shell
- Linux Shell常用技巧
- Linux Shell常用技巧
- 学的几个简单的SQL语句
- NSWindow 直接加载NSViewController
- HBase源码系列(三)HMaster启动过程
- Windows错误码大全
- ios 弹出视图全屏遮盖 与 ios7以后的导航栏遮盖view问题
- linux shell 常用
- 2017ccpc哈尔滨 hdu 6231 B k-th number 题解 二分答案+尺取法
- web页面调用支付宝支付
- 防sql注入
- 进入量子世界
- 11.15课堂作业-完成Coding Coffee产品页的like功能,鼠标点击事件
- 算法导论第七章(快速排序)
- 怎样通过Timer类创建计时器
- 2017.11.15作业