Merge pull request #1331 from Guilhem7/master
[RRG-proxmark3.git] / tools / pm3_eml2upper.sh
blobbac3237cc2342879f7382aecda6d94ceefa34970
1 #!/usr/bin/env bash
3 # Andrei Costin <zveriu@gmail.com>, 2011
4 # pm3_eml2upper.sh
5 # Converts PM3 Mifare Classic emulator EML file to UPPER case (for easier comparison in some text-comparison tools)
7 # http://www.linuxquestions.org/questions/programming-9/bash-script-parsing-optional-parameters-621728/
9 # show program usage
10 show_usage()
12 echo
13 echo "Usage:"
14 echo "${0##/} input.eml output.eml"
15 exit
18 # Minimum number of arguments needed by this program
19 MINARGS=2
21 # get the number of command-line arguments given
22 ARGC=$#
24 # check to make sure enough arguments were given or exit
25 if [[ $ARGC -lt $MINARGS ]] ; then
26 echo "Too few arguments given (Minimum:$MINARGS)"
27 echo
28 show_usage
31 tr '[:lower:]' '[:upper:]' < $1 > $2