Yes the awk "was" outputting the space prior to /20, but the new code removes it.
Just thought I would confirm, again, that we are on the same page with the following line as i have tried it several times and it does work.
(I would also mention that copy & paste from the forum does sometimes not include all spaces!!)
Code:
ipbits=$(ifconfig eth0 | awk -F: 'NR==2{print | "whatmask "$NF}' | awk -F"[ ]*:[ ]*" '/CIDR/{print $2}')
# ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^
All ^ refer to spaces. i jknow some are obvious but thought I would list all to be clear