Yes, you are right! Linux (*nix) is the ONLY answer! No need of perl! Neither any arcane scripting. Just plain 'bc' is enough.
Here's the trick:
- Copy all your numbers in plain text file.
- Put 'ibase=16' as your first and 'quit' as last lines in the file.
- You can put 'obase=n' as your second line, in case your output should be in base 'n' (10 is default, so skip it).
- bc your_file
Note: You need to redirect output of 'step 4' and collect it in a seperate file.
You can use any combination of ibase (Input base) and obase (Output base) in the range '2 thro 16'. But you need to ensure that all input numbers are in CAPITALS! Not a problem at all, use this command to achieve that:
(of course, the better way is open in vim and, ggVGgU)
# cat /tmp/hex.txt
# bc /tmp/hex.txt
Copyright 1991-1994, 1997, 1998, 2000 Free Software Foundation, Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty'.