shell/sed进阶/给文件中的行编号.sh

4 lines
45 B
Bash

#!/bin/bash
sed '=' test | sed 'N; s/\n/ /'