mirror of
https://github.com/Erreur32/cheat.git
synced 2024-12-22 13:42:11 +01:00
Specify output separator character
This commit is contained in:
parent
4c2d0d2d8e
commit
8f0d2e9fc3
1 changed files with 3 additions and 0 deletions
|
@ -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 a new issue