My guess is your "legacy conf file" has a line like: export SOMEVAR=^I (where ^I is a literal tab character) Given your regex, the culprit might even be a line that was meant to be commented out with a leading "#"... (PS: apologies if you're reading this for a 2nd time)