Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

awk define string as delimiter

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]}'
 
PREVIOUS NEXT
Tagged: #awk #define #string #delimiter
ADD COMMENT
Topic
Name
2+9 =