首页 > 系统服务 > 详细

shell变量的简单说明

时间:2016-06-12 23:39:05      阅读:230      评论:0      收藏:0      [点我收藏+]

$*

$@

区别

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

。。等等很多

在终端中 man cd 可查看

字符子串

#开头

%结尾开始










本文出自 “停止脚步等于慢性死亡” 博客,请务必保留此出处http://goforward.blog.51cto.com/11169198/1788449

shell变量的简单说明

原文:http://goforward.blog.51cto.com/11169198/1788449

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!