Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #LEN=expr length "$1"
- LEN="${#1}"
- echo $LEN
- if [ $1="AS*" ]; then
- ASN=${1##AS}
- echo "AS"
- else
- if [ $1=="as*" ]; then
- #ASN=$substr ${$1} 3 $LEN-3
- ASN=${1##as}
- echo "as"
- else
- if [ "$1"=="ASN*" ]; then
- ASN=${1###ASN}
- echo "ASN"
- else
- if [ "$1"=="asn*" ]; then
- #ASN=$substr ${$1} 2 $LEN-2
- ASN=${1###asn}
- echo "asn"
- else
- ASN=$1
- echo "Number Only"
- fi
- fi
- fi
- fi
- echo "\n" $ASN
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement