如何使用debug检测shell script语法问题
来源:互联网 发布:cda数据分析师工资 编辑:程序博客网 时间:2024/05/22 12:23
一、语法说明
sh [-nvx] scripts.sh(程序名)
选项与参数:
-n:不需要运行scripts,仅查询语法的问题
-v:在运行scripts前,先讲scripts的内容输出到屏幕上
-x:将使用到的scripts内容显示在屏幕上
二、实例
范例一:测试 sh16.sh 有无语法的问题?[root@www ~]# sh -n sh16.sh # 若语法没有问题,则不会显示任何资讯!范例二:将 sh15.sh 的运行过程全部列出来~[root@www ~]# sh -x sh15.sh + PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/root/bin+ export PATH+ for animal in dog cat elephant+ echo 'There are dogs.... 'There are dogs....+ for animal in dog cat elephant+ echo 'There are cats.... 'There are cats....+ for animal in dog cat elephant+ echo 'There are elephants.... 'There are elephants....
0 0
- 如何使用debug检测shell script语法问题
- shell script的debug
- shell script语法
- Shell Script - 追踪与debug
- shell script 的调试 debug
- 笔记:Shell Script 简明语法
- shell script中的循环语法
- Shell script的语法一:基础语法
- shell script 的追踪与 debug
- shell script 的追踪与 debug
- shell script循环语法与个别注意事项
- Shell script的语法二:判断命令
- Shell script的语法三:设置参数
- Shell script的语法五:循环
- Shell Script中%、%%、#、##使用区别
- flock shell script 使用速记
- PHP作为Shell Script使用
- script Debug
- JavaScript继承详解(六)
- 苹果软件的短连接地址
- 堆排序
- 最强DE 战斗力 【大数】
- 编程的标点 英文表达
- 如何使用debug检测shell script语法问题
- A new micro clearfix hack
- hdu5185 Equation
- 通过Java的反射机制创建运行时类的对象并调用其结构
- DSRP分析之network/
- hdoj 1281 棋盘游戏
- opencv轮廓相关的函数
- 关于荷兰HVR 数据复制软件的一点个人总结
- 敌兵布阵-线段树以及树形数组经典题型