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

Linux Shell 笔记二(循环结构)

程序12:类似java 里面的switch case
[root@localhost scripts]# cat sh12.sh
read -p "input comand:" command
case $command in
"fix")
echo "fix system"
;;
"fuck")
echo "fuck you"
;;
*)
echo "what a stupid man!ex>$0 some word"
esac
exit 0

程序13:简单简单,超级简单的一个函数
[root@localhost scripts]# cat sh13.sh
function printit()
{
echo -n "Your choice is $1"
}
#$1为控制台输入的第二个参数
printit 1;echo $1 | tr 'a-z' 'A-Z'

程序14:until do done
[root@localhost scripts]# cat sh14.sh
until [ "$yn" = "yes" ] || [ "$yn" == "YES" ]
do
read -p "please input yes/to stop this program:" yn
done

程序15:while do done
[root@localhost scripts]# cat sh15.sh
s=0
i=0
while [ "$i" != "100" ]
do
i=$(($i+1))
s=$(($s+$i))
done
echo "number of 1+2+3+...+100=$s"
程序16:for do done
[root@localhost scripts]# cat sh16.sh
s=0
for((i=1;i<=100;i=i+1))
do
s=$(($s+$i))
done
echo $s
exit 0

程序17:for do done(2)
[root@localhost scripts]# cat sh17.sh
for animal in dog cat elephant
do
echo "there are ""$animal"
done
exit 0

程序18:利用 for do done查找某一个目录下面的文件权限信息
[root@localhost scripts]# cat sh18.sh
read -p "input a directory:" dir
if [ "$dir" == "" ] || [ ! -d "$dir" ]; then
echo "The $dir is not exist in the system"
exit 1
fi
echo `ls $dir`
filelist=`ls $dir`
for filename in $filelist
do
perm="";
test -r "$dir/$filename" && perm="$perm readable"
test -w "$dir/$filename" && perm="$perm writable"
test -x "$dir/$filename" && perm="$perm execuatable"
echo "The file $dir/$filename's permission is $perm"
done


相关文档:

三款 Linux 下的免费桌面级杀毒软件(图)


由于 Linux 良好的用户权限管理体系,病毒往往是 Linux 系统管理员最后才需要考虑的问题。以往,Linux 上的杀毒软件主要是为企业的邮件和文件服务器所设计的。如今,随着 Linux 桌面用户数量的增长,桌面用户在受益于 Linux 系统对病毒较强的天然免疫力的同时,也需要杀毒软件清理从网络或U盘带来的WIndows病毒。尽管那些 ......

linux 64bit firefox flash plugin

http://plugindoc.mozdev.org/linux-amd64.html#flash
download flash:
http://download.macromedia.com/pub/labs/flashplayer10/libflashplayer-10.0.45.2.linux-x86_64.so.tar.gz
cp libflashplayer.so /usr/lib/mozilla-firefox/plugins
restart firefox
check:
about:plugins ......

(转)Linux下的CppUnit 的HelloWorld手记

转自:http://blog.csdn.net/panyuequn/archive/2009/12/07/4958454.aspx
版权声明:本文版权所属 Tx7do@上海半丁,可以随意复制传播,但是表把版权给扔啦=。=
操作系统系统:Ubuntu6,g++
软件版本:cppunit-1.10.2.tar.gz
(1)获得源码:
    到cppunit.sourceforge.net上下载源代码。将其复制到到l ......

linux笔试题目


一.填空题
1. 在Linux系统中,以     方式访问设备 。
2. Linux内核引导时,从文件     中读取要加载的文件系统。
3. Linux文件系统中每个文件用     来标识。
4. 全部磁盘块由四个部分组成,分别为               。
5. 链接 ......

Linux版本号

  Linux内核版本有两种:稳定版和开发版.稳定的内核具有工业级的强度,可以广泛地应用和部署.新的稳定内核相对于较旧的只是修正一些bug或加入一些新的驱动程序.而开发版内核由于要试验各种解决方案,所以变化很快.这两种版本是相互关联,相互循环的.
Linux内核的命名机制:
 
 
     num.nu ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号