易截截图软件、单文件、免安装、纯绿色、仅160KB

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


相关文档:

基于ATMEL AT91RM9200的嵌入式Linux移植笔记


  前面利用开发板带的现成的东西step by step让Linux 2.4.19在开发板上跑起来了,对于开发的流程也有了一定的认识。现在想对每一步进行详细深入的探讨,好好学习一下,把笔记记录下来,省得忘记了。有些内容是从看过的书中摘要过来的,大部分是自己实践后的心得。我想记得详细点,也好为后面总结打好基础。
------- ......

Eclipse+QT4.6(Linux)

1、首先是QT4.6的安装,参见QT4.6+QT Creator1.3安装(Linux)
2、再参见Eclipse+Qt4配置步骤(Linux版)
  将QT4.6的路径,如:
/opt/qtsdk-2009.05/qt/bin/
3、OK!
4、可以同时使用Eclipse和QT Creator 两个IDE了,呵呵。 ......

Linux内核及ARM的内存管理

欢迎回到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 ......

linux下动态库与静态库

体验一下linux下编写和使用动态库与静态库,范例:helloworld程序。
首先编写静态库:
hellos.h
 #ifndef _HELLO_S_H
#define _HELLO_S_H
void prints(char *str);
#endif
 
hellos.c
#include "hellos.h"
#include <stdio.h>
void prints(char *str)
{
printf("print in sta ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号