echo "A: B: C: D:" | awk -F'[:]' '{print $1}'
Output:
awk: warning: escape sequence `]' treated as plain `]'
A
I am getting the above warning message, I have tried multiple options to escape the ]
but that didn't resolve.
I want to use both the delimiters :
and print exactly the alphabets A
, B
, C
, D
by printing $1
, $2
, $3
, $4
respectively.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…