方法一:
awk '{printf("%d,%s\n",NR,$0)}' filename
方法二:
cat -n filename
方法三:
nl filename