ChinaUnix.net
相关文章推荐:

linux shell if判断

command1&command2&command3 三个命令同时执行 command1;command2;command3 不管前面命令执行成功没有,后面的命令继续执行 command1&&command2 只有前面命令执行成功,后面命令才继续执行 comand1||command2 无论第一个命令是否成功,都执行第二个命令 本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/6889/showart_2062718.html

by lc0060305 - Linux文档专区 - 2009-09-29 18:09:37 阅读(623) 回复(0)

相关讨论

linux系统shell脚本判断变量文件目录:权限、是否存在、空值、相等 由 feiiiiiii 于 星期四, 10/22/2009 - 11:44 发表 linux shell  先写一些基本语法: 1、字符串判断 str1 = str2      当两个串有相同内容、长度时为真 str1 != str2      当串str1和str2不等时为真 -n str1        当串的长度大于0时为真(串非空) -z str1        当串的长度为0时为真(空串) str1         当串st...

by liyihongcug - Shell - 2010-10-29 20:28:56 阅读(5443) 回复(7)

linux shell 如何判断一个文件是否存在 比如一个 a.sql 在脚本里写 if 存在 then 。。。。运行某个文件 /a.sh (如何些运行) end if

by liyihongcug - Shell - 2009-08-21 14:29:57 阅读(62449) 回复(14)

linux shell 中,进行如下判断: A="VALUE1" B="VALUE1" if [ "${A}" = "${B}" ] #--------注意:"="号左右有空格' ' then echo "ok" fi 可以echo "ok",逻辑是正常的。 但在solaris中 A="VALUE1" B="VALUE1" if [ "${A}" = "${B}" ] #--------注意:"="号左右有空格' ' then echo "ok" fi 却不可以echo "ok",逻辑异常。 请问应该如何调整solaris 的shell 可以支持类似linux 的...

by softiger - Shell - 2010-07-27 22:35:26 阅读(2559) 回复(8)
by interim2012 - Linux新手园地 - 2012-04-14 23:08:04 阅读(21274) 回复(4)

linux系统shell脚本判断变量文件目录:权限、是否存在、空值、相等 . 1、字符串判断[code]str1 = str2      当两个串有相同内容、长度时为真 str1 != str2      当串str1和str2不等时为真 -n str1        当串的长度大于0时为真(串非空) -z str1        当串的长度为0时为真(空串) str1         当串str1为非空时为真[/code]2、数字的判断[code] int1 -eq int2    两数相等为真 int...

by so_brave - 监控及自动化运维技术 - 2012-03-03 18:20:54 阅读(14926) 回复(2)

作者:康华, 华清远见嵌入式学院 讲师。 1. 关于某个档名的『类型』侦测(存在与否),如 test -e filename -e 该『档名』是否存在?(常用) -f 该『档名』是否为档案(file)?(常用) -d 该『文件名』是否为目录(directory)?(常用) -b 该『文件名』是否为一个 block device 装置? -c 该『文件名』是否为一个 character device 装置? -S 该『档名』是否为一个 Socket 档案? -p...

by 华清远见 - Linux文档专区 - 2010-01-25 11:29:24 阅读(1342) 回复(0)

怎样在linux下做个shell判断一张jpg图片为黑色

by zhangyidc - Shell - 2007-11-23 09:40:52 阅读(1670) 回复(3)

比如, 有个test.conf文件, 里面有一个特殊字符串abcdef信息. 我要在脚本中判断, 在test.conf中含有/不含有"abcdef"时分别做相应的处理. 即: if test.conf含有"abcdef"; then echo "yes" else echo "no" fi 请问这段脚本该怎么写, 如何与if的判断条件语法相结合?

by fifodct - Shell - 2013-10-08 15:40:47 阅读(2991) 回复(6)

向各位大侠求教一个shell编程题,从终端输入字符,判断是否符合linux命名规则,若符合则创建文件,否则输出提示信息, 在线等,小女子拜谢各位了。

by vedi2008 - Shell - 2011-08-15 13:28:50 阅读(12132) 回复(34)

本帖最后由 sunsansheng_cu 于 2011-06-03 09:17 编辑 一个文本 1.perl 里面有各种sql语句 select * from dwetlv ; insert into ; select * from xxxxx; insert into ; select * from dwetlv where a='1'; insert into ...select a from xxxx insert into select * select * insert into ... select ..... where b='123'; select * from xxxxx; insert into ; 我想在比如 select、insert....等等指定关键字前面插入...

by sunsansheng_cu - Shell - 2011-06-03 09:16:56 阅读(5189) 回复(22)