LINENO

输出当前脚本中的行号。在调试脚本时非常有用。

#!/bin/bash
# this is line 2
echo something  # this is line 3
echo $LINENO # Will output 4