Hello,
I need use comma and spaces as field delimiters, but I can't:
text:
hello myfriend,I need,some help
I need something like:
awk -F"<blank>|," '{print $1, $3}'
Thanks
Hello,
I need use comma and spaces as field delimiters, but I can't:
text:
hello myfriend,I need,some help
I need something like:
awk -F"<blank>|," '{print $1, $3}'
Thanks
awk -F"[ ,]" '{print $1, $3}' file
This also seems to work...
awk -F"[[:blank:],]" '{print $1, $3}' infile
or to include tabs and to treat consecutive delimiters as one:
$ echo 'hello myfriend,I need,some help'| awk -F "[ \t,]*" '{print $1, $3}'
hello I