摘要:
比较操作-eq或= -ne或!= -gt或>-lt或<-ge 大于或等于-le 小于或等于-z 为空-n 不为空1 s5#!/bin/sha=10b=5if [ $a -eq $b ]then echo "a=b"else if [ $a -le $b ] then echo "a<b" else echo "haha" fifi 注意:在"["和"]"两边都要有空格"="做赋值时,"="左右两边不留空格"="做判断时 阅读全文
posted @ 2013-04-14 12:00
Chenyong Liu
阅读(136)
评论(0)
推荐(0)
摘要:
shell script1 s1#!/bin/sh#set variable aa="hello world!"#printecho "A is"echo $a2 s2#!/bin/shnum=2echo "this is the $numnd"echo "this is the ${num}nd"3 s3#!/bin/basha="my love"echo $afunction func1(){ local a="Tang Wei" echo $a}func1echo $a 阅读全文
posted @ 2013-04-14 11:23
Chenyong Liu
阅读(156)
评论(0)
推荐(0)


浙公网安备 33010602011771号