mirror of https://github.com/cheat/cheat.git
Specify output separator character
This commit is contained in:
parent
4c2d0d2d8e
commit
8f0d2e9fc3
|
@ -6,3 +6,6 @@ printf '1:2:3' | awk -F ":" '{print $1+$2+$3}'
|
||||||
|
|
||||||
# print a multiplication table
|
# print a multiplication table
|
||||||
seq 9 | sed 'H;g' | awk -v RS='' '{for(i=1;i<=NF;i++)printf("%dx%d=%d%s", i, NR, i*NR, i==NR?"\n":"\t")}'
|
seq 9 | sed 'H;g' | awk -v RS='' '{for(i=1;i<=NF;i++)printf("%dx%d=%d%s", i, NR, i*NR, i==NR?"\n":"\t")}'
|
||||||
|
|
||||||
|
# Specify output separator character
|
||||||
|
printf '1 2 3' | awk 'BEGIN {OFS=":"}; {print $1,$2,$3}'
|
||||||
|
|
Loading…
Reference in New Issue