1
比較思科固件版本我固件映像在我的系統,我能夠得到思科AP的當前版本使用shell腳本
#! /bin/bash
imageFileName="ap1g2-k9w7-tar.152-4.JA1.tar"
#Get image file version in format as given below after using one function
imageFileVersion="15.2(4)JA1"
#retrieve the current version from the cisco ap
currentCiscoAPVersion="15.2(4)JA1"
#Now we need to compare these two values as given below
if [[ "$imageFileVersion" -eq "$currentCiscoAPVersion" ]]; then
echo "update not required"
else
echo "update required "
fi
我都試過,但不能在shell腳本來比較(慶典)
必備:①做了什麼(包括完整的情況)? ②期望什麼? ③反而觀察到了什麼? – Alfe