linux-tutorial/codes/shell/查找替换文本/sed/输出末尾指定行数的数据.sh
2019-10-29 18:22:19 +08:00

12 lines
95 B
Bash

#!/usr/bin/env bash
#输出末尾10行数据
sed '{
:start
$q
N
11,$D
b start
}' /etc/passwd