- awk -F '[,\t]' '{printf("one:%s two:%s three:%s\n",$0,$1,$2);}'
- echo "1,2|3:4,5" | awk 'BEGIN{FS="[|,:]"}{printf("zero:%s one:%s two:%s three:%s four:%s five:%s \n",$0,$1,$2,$3,$4,$5);}'
- zero:1,2|3:4,5 one:1 two:2 three:3 four:4 five:5
awk field separators
Posted by Anonymous on Fri 15th Jun 2018 01:48
raw | new post
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.