#!/bin/bash
PER=$1
case $PER in
''|*[!0-9]*)
#non numeric
echo "Missing input value 5-100"
exit 1
;;
*)
#good
esac
if [ $PER -lt 5 ]; then PER=5; fi
#VAL=$(( $PER / 100 ))
VAL=$(echo "$PER / 100" | bc -l)
xrandr --output HDMI-1 --brightness $VAL
exit