mirror of
https://github.com/cheat/cheat.git
synced 2024-12-18 18:55:06 +01:00
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
|
||||
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
Block a user