菜鸟求助 There is a shell script of chanaging suffix of files,But cannot work at the moment. !#/bin/bash # # change the suffix (extension name) of files wronqPMTR=20 inputPMTR=2 oneFileConverted=1 numberOfFilesConverted=0 if [ $? -ne "$inputPMTR" ] then echo "Usage: `basename $0` old-suffix-name new-suffix-name" exit $wrongPMTR for fileName in *$1* do if [ -f "#...
by max44 - Shell - 2008-08-25 21:45:23 阅读(1440) 回复(4)
比如说我写了一个command.bash 文件,里面有统计输出的命令。 同时也建了一个commands.desktop文件。 当我点击在桌面上的commands.desktop 的icon时,这时要运行统计输出的命令。 我的问题是,我的icon 有图的时候就不运行命令,运行命令的时候,icon就没有图了 怎么解决呢? 是不是在redirection时写的不对呢?
Linux程式设计-11.shell script(bash)--(10)控制圈while/until while list do list done 当list为True时,该圈会不停地执行。 例一 : 无限回圈写法 #!/bin/sh while : ; do echo "do something forever here" sleep 5 done 例二 : 强迫把pppd杀掉。 #!/bin/sh while [ -f /var/run/ppp0.pid ] ; do killall pppd done --------------------------------------------------------------------...
"Hello world" shell script 照传统程式教学例,这一节介绍shell script的"Hello World"如何撰写。 -------------------------------------------------------------------------------- #!/bin/sh # Filename : hello echo "Hello world!" -------------------------------------------------------------------------------- 大家应该会注意到第一行的"#!/bin/sh"。在UNIX下,所有的可执行script,不管是那一种语言...
"Hello world" shell script 照传统程式教学例,这一节介绍shell script的"Hello World"如何撰写。 -------------------------------------------------------------------------------- #!/bin/sh # Filename : hello echo "Hello world!" -------------------------------------------------------------------------------- 大家应该会注意到第一行的"#!/bin/sh"。在UNIX下,所有的可执行script,不管是那一种语言...
http://www.openchess.org/noitatsko/programming/ (2001-05-25 08:10:00) 众所皆知地,UNIX上以小工具着名,利用许多简单的小工具,来完成原本需要大量软体开发的工作,这一点特色,使得UNIX成为许多人心目中理想的系统平台。 在众多的小工具中,shell script算得上是最基本、最强大、运用最广泛的一个。它运用围之广,不但从系统启动、程式编译、定期作业、上网连线,甚至安装整个Linux系统,都可以用它来完成。 因为shell S...
http://www.openchess.org/noitatsko/programming/ (2001-05-25 08:10:00) 众所皆知地,UNIX上以小工具着名,利用许多简单的小工具,来完成原本需要大量软体开发的工作,这一点特色,使得UNIX成为许多人心目中理想的系统平台。 在众多的小工具中,shell script算得上是最基本、最强大、运用最广泛的一个。它运用围之广,不但从系统启动、程式编译、定期作业、上网连线,甚至安装整个Linux系统,都可以用它来完成。 因为shell S...
shell script To Read IP Address ( Find Ip Address script )
#!/bin/sh
# shell script scripts to read ip address
# -------------------------------------------------------------------------
# Copyright (c) 2005 nixCraft project