linux shell基础
2016-01-06 11:32
302 查看
第一个shell脚本 #! /bin/sh a=5 b=5 echo a=$a echo b=$b if (test "$a" = "$b") then echo a=b else echo a!=b fi
$# 表示参数的总数
$i 表示第i个参数 (第0个数参数本身) 只能填写0到9这10个数据,不能超过10个
$* 表示所有参数
#! /bin/sh echo $# echo $1 echo $*
./abc 109.123.120.209 8080
res:
2
109.123.120.209
109.123.120.209 8080
$? 上一个命令的返回值
shift 语句 解决$i只能10个问题
相关文章推荐
- 195. Tenth Line leetcode bash
- 194. Transpose File leetcode Bash
- 193. Valid Phone Numbers leetcode Bash
- 192. Word Frequency My Submissions Question Leetcode Bash
- -bash: ulimit: pipe size: cannot modify limit: Invalid argument
- -bash: ulimit: pipe size: cannot modify limit: Invalid argument
- -bash: ulimit: pipe size: cannot modify limit: Invalid argument
- shell\comdlg32\fileopensave.cpp(9456)\COMDLG32.dll!
- chapte13:学习shell scripts之(3)条件判断式
- shell处理文件
- shell 中常见问题处理记录
- “HINSTANCE ShellExecuteW(HWND,LPCWSTR,LPCWSTR,LPCWSTR,LPCWSTR,INT)”
- 使用Jailkit在CentOS上建立一个受限shell
- 《Linux程序设计》笔记(二)shell程序设计
- Shell的系统变量
- adb shell top用法
- 使用switch制作Powershell命令菜单
- 用ShellExecute执行cmd命令遇到的问题总结
- C程序调用shell脚本共有三种方法
- 15.bash编程变量