Linux½Å±¾±àд»ù´¡(Îå)
ʵÀý)
ÏÖÔÚÎÒÃÇÀ´ÌÖÂÛ±àдһ¸ö½Å±¾µÄÒ»°ã²½Öè¡£ÈκÎÓÅÐãµÄ½Å±¾¶¼Ó¦¸Ã¾ßÓаïÖúºÍÊäÈë²ÎÊý¡£²¢ÇÒдһ¸öα½Å±¾£¨framework.sh£©£¬¸Ã½Å±¾°üº¬ÁË´ó¶àÊý½Å±¾¶¼ÐèÒªµÄ¿ò¼Ü½á¹¹£¬ÊÇÒ»¸ö·Ç³£²»´íµÄÖ÷Òâ¡£Õâʱºò£¬ÔÚдһ¸öеĽű¾Ê±ÎÒÃÇÖ»ÐèÒªÖ´ÐÐÒ»ÏÂcopyÃüÁ
cp framework.sh myscript
È»ºóÔÙ²åÈë×Ô¼ºµÄº¯Êý¡£
ÈÃÎÒÃÇÔÙ¿´Á½¸öÀý×Ó£º
¶þ½øÖƵ½Ê®½øÖƵÄת»»
½Å±¾b2d ½«¶þ½øÖÆÊý (±ÈÈç 1101) ת»»ÎªÏàÓ¦µÄÊ®½øÖÆÊý¡£ÕâÒ²ÊÇÒ»¸öÓÃexprÃüÁî½øÐÐÊýѧÔËËãµÄÀý×Ó£º
1
#!/bin/sh
2
# vim: set sw=4 ts=4 et:
3
help()
4
{
5
cat <
6
b2h -- convert binary to decimal
7
USAGE: b2h [-h] binarynum
8
OPTIONS: -h help text
9
EXAMPLE: b2h 111010
10
will return 58
11
HELP
12
exit 0
13
}
14
error()
15
{
16
# print an error and exit
17
echo "$1"
18
exit 1
19
}
20
lastchar()
21
{
22
# return the last character of a string in $rval
23
if [ -z "$1" ]; then
24
# empty string
25
rval=""
26
return
27
fi
28
# wc puts some space behind the output this is why we need sed:
29
numofchar=`echo -n "$1" | wc -c | sed 's/ //g' `
30
# now cut out the last char
31
rval=`echo -n "$1" | cut -b $numofchar`
32
}
33
34
chop()
35
{
36&nbs
Ïà¹ØÎĵµ£º
ת×Ôhttp://blog.chinaunix.net/u/30619/showart.php?id=249558
1 linuxĿ¼¼Ü¹¹
/ ¸ùĿ¼
/bin ³£ÓõÄÃüÁî binary file µÄÄ¿錄
/boot ´æ·ÅÏµÍ ......
LinuxÏÂPatchµÄÓ¦ÓúÍÖÆ×÷·½·¨½éÉÜ £¨1£©
·¢²¼Ê±¼ä£º2007.04.19 06:10 À´Ô´£ºÈüµÏÍø¼¼ÊõÉçÇø ×÷Õߣºskid
ÒòΪÔÚu-bootÒÆÖ²¹ý³ÌÖУ¬Óм¸´¦Í¨ÓÃÎļþÒªÐ޸ģ¬Èç¹ûÿ´Î¶¼ÒªÊÖ¶¯Ð޸ľÍÌ«Âé·³ÁË¡£ÖÆ×÷²¹¶¡¿ÉÒÔ½â¾öÕâ¸öÎÊÌâ¡£
ѧϰ×ÊÁϵÄÊÕ¼¯±È½Ï¼òµ¥£¬ ......
document.body.oncopy = function() {
if (window.clipboardData) {
setTimeout(function() {
var text = clipboardData.getData("text&qu ......
Linux 2.6 ÏÂÄÚºËÄ£¿éµÄMakefile
ÊÕ²Ø
Linux 2.6 ÏÂÄÚºËÄ£¿éµÄMakefile
# Makefile 2.6
obj-m += hello.o
KDIR:=/lib/modules/$(shell uname -r)/build
# PWD=$(shell pwd)
all:
&n ......