"Randall S. Becker" <rsbecker@xxxxxxxxxxxxx> writes: > cat <<-EOF | sed "1,\$s/_/ /g" >expect > { level1 ... > ________{ level2 > Etc. > EOF > > Providing you don't use _ elsewhere in the output. It's a bit hacky but works. The trick is especially useful if your golden master has mixture of SP and HT, as you can write the source in a way that helps readers understand what is going on, and turn that with sed into what the machines would want to see. When used that way, I'd say it is not "bit hacky but works", but actually is a beautiful solution ;-).