Re: awk not just using the Field separator as such. it is using the blank space as well ...
> https://mywiki.wooledge.org/BashPitfalls#pf47
>
what I am trying to do is split a string using as delimiter a pipe. I
used to do that with awk, but it doesn't work anymore after someone
had the great idea of substituting awk with mawk, it seems; and Hey!
They could have done it with python!:
$ which awk
/usr/bin/awk
$ which mawk
/usr/bin/mawk
$ awk -W version
mawk 1.3.4 20200120
Copyright 2008-2019,2020, Thomas E. Dickey
Copyright 1991-1996,2014, Michael D. Brennan
random-funcs: srandom/random
regex-funcs: internal
compiled limits:
sprintf buffer 8192
maximum-integer 2147483647
$ mawk -W version
mawk 1.3.4 20200120
Copyright 2008-2019,2020, Thomas E. Dickey
Copyright 1991-1996,2014, Michael D. Brennan
random-funcs: srandom/random
regex-funcs: internal
compiled limits:
sprintf buffer 8192
maximum-integer 2147483647
$
How do you split a string using as delimiter a pipe these days
without using a bloody hack?
Reply to: