I would like to check if two arguments to a bash function are numeric, and the last argument is a directory that exists.
Have done like this, but the implementation is quite insufficient.
if [[ $1 =~ "^[0-9]+$" ]] \
&& [[ $2 =~ "^[0-9]+$" ]] \
&& [[ -d $3 ]]
then
do_something
fi