ChinaUnix.net
相关文章推荐:

shell 两种运行方式

我在shell中使用了exit #number语句,执行时用. myshell.sh,结果整个终端被关闭。使用bash myshell.sh退出是正常的。请教各位用‘.’ 执行和bash解释器执行的区别(脚本中指定了# !/bin/bash),谢谢!

by pjz0311 - Shell - 2005-07-13 09:33:46 阅读(1180) 回复(4)

相关讨论

方法,一是且Popen. output = subprocess.Popen(['ls','-l'],stdout=subprocess.PIPE,shell=True).commun icate() print output[0] 另外一则可返回状态与调用的shell命令的输出结果 >>> import commands >>> status, output = commands.getstatusoutput('ls -l') 本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/73684/showart_1189860.html

by bj2008_0201 - Python文档中心 - 2008-09-12 14:30:00 阅读(1680) 回复(0)

方法,一是且Popen. output = subprocess.Popen(['ls','-l'],stdout=subprocess.PIPE,shell=True).commun icate() print output[0] 另外一则可返回状态与调用的shell命令的输出结果 >>> import commands >>> status, output = commands.getstatusoutput('ls -l') Thanks to sin :) 本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/12325/showart_217175.html

by icymoon - Python文档中心 - 2006-12-17 14:54:13 阅读(1161) 回复(0)

shell脚本用在crontab中,为了防止同时启动多次,想了个办法,但是都有缺点,求更好的方法: 假设shell脚本为shellTest.sh 1. nProcCount=`ps -ef | grep shellTest.sh | grep -v grep |wc -l` if [ $nProcCount -gt 1 ] then echo already startup! exit 1; fi 第一方案在不同的主机平台上面会有不同的结果,比如在AIX上面就没有问题,但是在HP上面crontab里面启动的shell脚本,nProcCount 的结果为2,另外在...

by splitflag - Shell - 2010-11-24 16:59:21 阅读(3859) 回复(14)

为什么有的shell 如 test.sh可以这样运行 ./test.sh 但有的需要 . test.sh才能运行

by tony9427 - Shell - 2007-07-20 13:51:09 阅读(1576) 回复(2)

php真是个好东西,可以在终端下运行。在linux下如果安装了php我们就可以把它当成shell运行。 下面给个例子test.php,假设php安装在/usr/local/下: #!/usr/local/bin/php /*上面这行就和写shell或perl一样,指定php的位置*/ shell"; ?> 将这个文件的权限改成可执行,我们就可以直接运行它了。 在windows的命令台下也可以运行,不过方式要改变下: php.exe test.php [ 本帖最后由 fangshi 于 2005-11-25 12:27 编...

by fangshi - PHP - 2005-11-25 12:10:39 阅读(1910) 回复(9)
by coderror - Linux论坛 - 2005-11-08 15:47:38 阅读(670) 回复(2)
by 少阳剑 - PHP - 2007-04-23 11:19:19 阅读(1328) 回复(2)

以简单的重启apache服务为例,如何利用WEB界面实现/etc/init.d/httpd restart ?

by yindows - Shell - 2006-12-11 17:14:32 阅读(1284) 回复(3)

在后台运行个相似的shell,里面有很多变量是一样的名字,这样的话他们的变量是不想互影响呢,还是想互作用,互想抢着用,如果是,那怎样才能定义这个变量只能在这个shell用呢,谢谢

by ccf - Shell - 2004-01-20 15:49:05 阅读(1101) 回复(4)

redhat中图形化方式下,什么样的可执行文件点击后出现选择shell运行或直接运行? 是不是像.sh.pl 的需要用shell方式,像binary二进制的需要直接运行

by hotlsmiler - 系统管理 - 2006-06-10 22:32:18 阅读(485) 回复(0)