摘要:
收了本论坛的三个例子
[quote:b425e56bf6]1、用某一文件的一个域替换另一个文件中的的特定域?
http://bbs.chinaunix.net/forum/viewtopic.php?t=500015
文件passwd:
s2002408030068:x:527:527::/home/dz02/s2002408030068:/bin/pw
s2002408032819......
摘要:
#!/bin/bash
tz=utc-8
beijing=`date +%h:%m`
echo -n "请输入您想差看的城市名称:"
read city_name
city=`cat city.txt |grep $city_name`
gap=`echo $city |awk {print $3}`
echo
echo -n "$city_name现在的时间是:`date --date "......
shell游戏:贪吃蛇 修正版上一页 ...map2=("2 16 10 1" "2 48 10 1" "7 32 10 1" "7 64 10 1")
map3=("4 16 24 2" "10 16 24 2" "16 16 24 2" "4 16 11 1")
【程序编程相关:
3D游戏引擎设计与实现(18)】 【推荐阅读:
AboutFish】map4=("10 4 34 2" "4 20 12 1" "4 40 12 1" "4 60 12 1")
【扩展信息:
关于IBR的一点想法】 map5=("5 10 29 2" "15 10 29 2" "5 16 7 1" "7 60 6 1" )
map6=("8 4 35 2" "2 50 5 1" "10 4 36 2" "11 30 5 1" )
#where is fruit? format:y x
fruit1=("14 10" "13 56" "2 40" "3 8" "17 50" "18 76" "14 30" "6 66")
fruit2=("4 14" "2 40" "14 48" "12 68" "9 30" "18 6" "3 76" "18 78")
fruit3=("7 14" "18 4" "15 40" "11 24" "5 18" "9 56" "3 76" "17 64")
fruit4=("11 10" "11 62" "9 38" "9 72" "6 58" "14 26" "17 58" "3 6")
fruit5=("6 14" "16 14" "3 40" "6 22" "14 58" "12 34" "8 50" "9 62")
fruit6=("2 52" "7 40" "7 60" "4 70" "11 28" "11 32" "15 22" "17 78" )
#--------------function--------------
#draw screen
function draw_line () {
local i=1
while [ "$i" -le "80" ]
do
echo -ne "\33[${1};${i}h*"
(( i++ ))
done
}
function draw_row () {
local i=2
while [ "$i" -le "22" ]
do
echo -ne "\33[${i};${1}h*"
(( i++ ))
done
}
function draw_help () {
echo -ne "\33[7;31m\33[24;1hplay:w s a d pause:p newgame:n quit:q -- copyright -- 2005-07-28 bitbull --\33[0m"
}
function screen () {
echo -ne "\33[37;44m"
draw_line 1
...
下一页 摘要:
[color=blue:c9aab565de]什么是 shell? [/color:c9aab565de]
[quote:c9aab565de]
shell是一种具备特殊功能的程序,它是介于使用者和 unix/linux 操作系统之核心程序(kernel)间的一个接口。为什么我们说 shell 是一种介于系统核心程序与使用者间的中介者呢?读过操作系统概论的读者们都知道操作系统是一个系统资源的......