shell变量的简单说明
2016-06-12 20:51
417 查看
$*
$@
区别
shift 参数向前移一位,移动位置变量。
$?
$n
$#
$0
$!
$$
#!/bin/sh
pidpath=/tmp/p.pid
if [ -f "$pidpath" ]
then
kill -USR2 `cat $pidpath ` 》/dev/null 2>&1
rm -f $pidpath
fi
echo $$ > $pidpath
sleep 300
系统中某一个脚本同时只能运行一个的时候
bash内置命令
echo
eval
exec
export
read
shift
exit
time
expr
。。等等很多
(()) let expr bc()
在终端中 man cd 可查看
字符子串
#开头
%结尾开始
四则运算计算器
let i=i+8 == ((i=i+8))
本文出自 “停止脚步等于慢性死亡” 博客,请务必保留此出处http://goforward.blog.51cto.com/11169198/1788449
$@
区别
shift 参数向前移一位,移动位置变量。
$?
$n
$#
$0
$!
$$
#!/bin/sh
pidpath=/tmp/p.pid
if [ -f "$pidpath" ]
then
kill -USR2 `cat $pidpath ` 》/dev/null 2>&1
rm -f $pidpath
fi
echo $$ > $pidpath
sleep 300
系统中某一个脚本同时只能运行一个的时候
bash内置命令
echo
eval
exec
export
read
shift
exit
time
expr
。。等等很多
(()) let expr bc()
在终端中 man cd 可查看
字符子串
#开头
%结尾开始
四则运算计算器
let i=i+8 == ((i=i+8))
本文出自 “停止脚步等于慢性死亡” 博客,请务必保留此出处http://goforward.blog.51cto.com/11169198/1788449
相关文章推荐
- 浅谈shell—eval
- shell 基础 $(cd `dirname $0`;pwd)
- shell 脚本
- shell实现ftp命令示例
- Shell 字符串、数字、文件判断
- Xshell无法连接Ubuntu,但能够ping通虚拟机
- shell基础
- Shell命令速查
- Shell中命令替换$(...)与后置引用`...`的区别与联系
- Linux Shell系列教程之(九)Shell判断 if else 用法
- Powershell学习之道-文件夹共享及磁盘映射
- shell脚本摘要
- mac环境变量设置
- Shell特殊变量:Shell $0, $#, $*, $@, $?, $$和命令行参数
- Shell中条件判断if中的各种参数的意思
- aws:使用xshell工具root用户登录EC2
- HBase Shell 的基本操作
- HBase Shell 的基本操作
- betterdownload.sh: 42: betterdownload.sh: Syntax error: "(" unexpected
- adb shell screenrecord命令行使用说明