print line number and number of characters on each line
This commit is contained in:
onceupon 2017-05-10 19:22:41 +08:00 committed by GitHub
parent 432ef68cae
commit 8b0940895b

View File

@ -340,10 +340,10 @@ a=bbo;b=obb;
awk -v a="$a" -v b="$b" "$1==a && $10=b' filename
```
##### print number of characters on each line
##### print line number and number of characters on each line
```bash
awk '{print length ($0);}' filename
awk '{print NR,length($0);}' filename
```
##### find number of columns