mirror of
https://github.com/onceupon/Bash-Oneliner.git
synced 2024-12-24 01:06:36 +00:00
edit awk
print line number and number of characters on each line
This commit is contained in:
parent
432ef68cae
commit
8b0940895b
@ -340,10 +340,10 @@ a=bbo;b=obb;
|
|||||||
awk -v a="$a" -v b="$b" "$1==a && $10=b' filename
|
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
|
```bash
|
||||||
awk '{print length ($0);}' filename
|
awk '{print NR,length($0);}' filename
|
||||||
```
|
```
|
||||||
|
|
||||||
##### find number of columns
|
##### find number of columns
|
||||||
|
Loading…
Reference in New Issue
Block a user