Answers for "awk field separator space"

0

awk field separator space

Just use function split in awk command to split a line into an array 'a'
using a choosen string as delimiter as for example ", " in next use case:
echo "hi, bye, hey" | awk '{split($0,a,", "); print a[3],a[2],a[1]}'
Posted by: Guest on October-27-2020

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language