Advertisement
Guest User

Untitled

a guest
Nov 5th, 2014
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. #LEN=expr length "$1"
  2. LEN="${#1}"
  3. echo $LEN
  4. if [ $1="AS*" ]; then
  5. ASN=${1##AS}
  6. echo "AS"
  7. else
  8. if [ $1=="as*" ]; then
  9. #ASN=$substr ${$1} 3 $LEN-3
  10. ASN=${1##as}
  11. echo "as"
  12. else
  13. if [ "$1"=="ASN*" ]; then
  14. ASN=${1###ASN}
  15. echo "ASN"
  16. else
  17. if [ "$1"=="asn*" ]; then
  18. #ASN=$substr ${$1} 2 $LEN-2
  19. ASN=${1###asn}
  20. echo "asn"
  21. else
  22. ASN=$1
  23. echo "Number Only"
  24. fi
  25. fi
  26. fi
  27. fi
  28.  
  29.  
  30. echo "\n" $ASN
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement