0

How to get line number of the bash script on run time?

  • Variable $LINENO has the line number of the bash script.
  • We can call it in any line.
  • It wisely helpful in debugging and logging purpose.
Linux Bash Bash-scripting Shell Script Bourne shell Add a comment
ethan
asked Jun 03 2024
edited Jun 03 2024