Debian Codegraph @

line-number.sh

raw symbols SCIP
1 #!/bin/bashscip-shell filesystem . . `/bin/bash`.
2 # line-number.sh
3
4 # This script echoes itself twice to stdout with its lines numbered.
5
6 echoscip-shell system . . echo. " line number = $LINENO" # 'nl' sees this as line 4
7 # (nl does not number blank lines).
8 # 'cat -n' sees it correctly as line #6.
9
10 nlscip-shell system . . nl. `basenamescip-shell system . . basename. $0`
11
12 echoscip-shell system . . echo.; echoscip-shell system . . echo. # Now, let's try it with 'cat -n'
13
14 catscip-shell system . . cat. -n `basenamescip-shell system . . basename. $0`
15 # The difference is that 'cat -n' numbers the blank lines.
16 # Note that 'nl -ba' will also do so.
17
18 exit 0
19 # -----------------------------------------------------------------