Linux Shell 进度条显示函数(备忘)
1.点号进度显示code 1
#!/bin/sh
#输出"."进度条函数,兼容bsh、ksh、bash
#首先trap 1 2 3 15信号,重要
trap 'kill $BG_PID;echo;exit' 1 2 3 15
function dots
{
stty -echo >/dev/null 2>&1
while true
do
echo -e ".\c"
sleep 1
done
stty echo
echo
}
#---------------------------------------------
# 主程序开始
#---------------------------------------------
#首先使dots函数后台运行
dots &
BG_PID=$!
#开始程序主体,本例中执行休眠10秒
#注意必要时--8
2.井号进度显示code 2
#!/bin/sh
abort() {
printf "\033[m\n"
exit
}
#donothing,justsimulatetimeconsume.
idle() {
i=1
sum=`date +%S`
sum=`expr $sum \* $sum | cut -b1`
sum=`expr $sum \* 10`
while [ $i -le $sum ]
do
i=`expr $i + 2`
trap abort 2
done
}
proc() {
begin=$1
end=$2
row=$3
pos1=`expr $begin + 1`
pos2=`expr $end - 1`
mid=`echo "($begin+$end)/2-2" |bc`
printf "\033[2J"
printf "\033[${row};${begin}H["
printf "\033[${row};${end}H]"
echo ##########################$pos1 -le $pos2
while [ $pos1 -le $p
相关文档:
Service Discovery Protocol(SDP)提供一种能力,让应用程序有方法发现哪种服务可用以及这种服务的特性。
服务发现协议(SDP或Bluetooth SDP)在蓝牙协议栈中对蓝牙环境中的应用程序有特殊的含意,发现哪个服务是可用的和确定这些可用服务的特征。SDP定义了bluetooth client发现可用bluetooth server服务和它们的特征的方法。 ......
由于Linux不是中国人开发的,开发过程中也不是以中文为母语,虽有中文语言包,在软件兼容性上出现中文乱码也在所难免。我抽取网络上前人的经验,结合自己的理解,将他们加以总结,希望对后来者有所帮助。
1、html文件乱码;
&nbs ......
欢迎回到Kernel中……
继续说__vet_atags函数,这个函数仍旧定义在arch\arm\kernel\head-common.s文件中:
/* Determine validity of the r2 atags pointer. The heuristic requires
* that the pointer be aligned, in the first 16k of physical RAM and
* that the ATAG_CORE marker ......
注:以下内容转自:
http://blog.chinaunix.net/u2/81965/showart_1674967.html
国内站点:
ftp://ftp.altera.com/outgoing/release/
http://www.china-vision.net/blog/user1/6/archives/2006/200696114213.html
http://mail.google.com
shao_华恒公司的主页,里面有很多的相关资料,有待大家去发现
......
<!--
/* Font Definitions */
@font-face
{font-family:宋体;
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-alt:SimSun;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 135135232 16 0 262145 0;}
@font-face
{font-family:"\@宋体" ......