test.sh
#!/bin/bash set -e trap 'echo $LINENO' EXIT /bin/false
run
$ ./test.sh 1
How may I get the actual line number of "/bin/false" instead of always '1'?
You are getting 1 because you trap EXIT. Try :
trap ... ERR