Created
January 11, 2016 10:53
-
-
Save Tony3-sec/76c8d1751d19c3ab8cff to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| ## Convert hex to decimal | |
| if [ $# -ne 1 ]; then | |
| echo "Usage: $0 [hex data]" | |
| exit 1 | |
| fi | |
| head=0x | |
| data=$1 | |
| hex=$head$data | |
| echo $(($hex)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment