variable

Bash LINENO

Expands to the current source line number in ordinary script execution; line positions depend on source layout.

Formal Syntax & Structure

bash syntaxbash
$LINENO

Return Value

integer

Expands to the current source line number in ordinary script execution; line positions depend on source layout.

Working Example

Example Snippetbash
printf '%s\n' "$LINENO"printf '%s\n' "$LINENO"
Bash Reference