I am writing a script that takes a 3-digit number and checks if they are unique and produces files with each digit, for example if I run "myscript 123" it will generate three files: file1, file2, and file3 BUT if I ran "my script 121" it will generate file1 and file2
I need help to look at the argument and compare each digit, could anyone give me a hand?
This is what I have written so far:
if [ $1 -gt 99 ] && [ $1 -lt 1000 ]
then
echo "Your three digit number: $1"
else
echo "please restart and enter a 3-digit number"
exit
fi