#!/bin/basha=4b=5# here ' a ' and ' b ' canbetreatedeitherasintegersorstrings.# thereissomeblurringbetwenthearithmetings sincebashvariablesarenotstronglytyped.# bashpermitsintegeroperationsandcomparisonsonvariables # wosevalueconsistsofall-intsofall cautionadvised,however.echo if [ ' $ a '-ne ' $ b ' ] thenecho ' $ ais not=' $ b ' ] thenecho ' $ aisnotequalto $ b ' ]='5' # ASCII 52!=ascii 53fi # inthisparticularinstance,both '-ne' and '!=' work.echoexit 0
4 is not equal to 5
(arithmetic comparison )
4 is not equal to 5。
(string comparison )