shell 脚本编程
2015-08-26 17:11
666 查看
1. 变量赋值时,等号左右不能留空格
2. 命令行输出的内容赋值给变量使用 变量=$(命令),比如
CPU=$(top -b -n 1)
3. 条件语句语法
if [ 表达式 ]; then
...
fi
2. 命令行输出的内容赋值给变量使用 变量=$(命令),比如
CPU=$(top -b -n 1)
3. 条件语句语法
if [ 表达式 ]; then
...
fi
相关文章推荐
- PowerShell管理Hyper-V(Windows2008R2)
- Office 365 IT Professional——如何用PowerShell创建Site Collection?
- SharePoint PowerShell命令系列 (12) New-SPWebApplication
- SharePoint PowerShell命令系列 (11) Remove-SPWeb
- SharePoint PowerShell命令系列 (10) Get-SPWeb & Set-SPWeb
- SharePoint PowerShell命令系列 (9) New-SPWeb
- SharePoint PowerShell命令系列 (8) Remove-SPSite
- SharePoint PowerShell命令系列 (7) Move-SPSite
- SharePoint PowerShell命令系列 (6) Get-SPSite & Set-SPSite
- SharePoint PowerShell命令系列 (5) New-SPSite
- SharePoint PowerShell命令系列 (4) Get-SPSolution
- SharePoint PowerShell命令系列 (3) 操作WSP解决方案包的相关命令
- bash_profile打不开怎么办,用nano .bash_profile打开
- SharePoint PowerShell命令系列 (2) Export-SPWeb & Import-SPWeb
- SharePoint PowerShell命令系列 (1) Backup-SPSite & Restore-SPSite
- 在Linux Bash通过上下键快速查找历史命令
- Linux shell 字符串常用操作
- Office 365 IT Professional——利用PowerShell设置Reset Password
- shell test用法
- 用shell脚本批量修改文件后缀名