proxmark3/tools/pm3_eml2upper.sh
Joe Harrison 7d157606ee Use /usr/bin/env in shebangs
Stop assuming that bash is in /bin, and that perl and python are in
/usr/bin, etc.
Instead, use env command to find these commands in the path.
2020-02-18 00:00:24 +00:00

31 lines
751 B
Bash
Executable file

#!/usr/bin/env bash
# Andrei Costin <zveriu@gmail.com>, 2011
# pm3_eml2upper.sh
# Converts PM3 Mifare Classic emulator EML file to UPPER case (for easier comparison in some text-comparison tools)
# http://www.linuxquestions.org/questions/programming-9/bash-script-parsing-optional-parameters-621728/
# show program usage
show_usage()
{
echo
echo "Usage:"
echo "${0##/} input.eml output.eml"
exit
}
# Minimum number of arguments needed by this program
MINARGS=2
# get the number of command-line arguments given
ARGC=$#
# check to make sure enough arguments were given or exit
if [[ $ARGC -lt $MINARGS ]] ; then
echo "Too few arguments given (Minimum:$MINARGS)"
echo
show_usage
fi
tr '[:lower:]' '[:upper:]' < $1 > $2