while and cats

Darrin Chandler dwchandler at stilyagin.com
Mon Feb 5 14:11:18 MST 2007


On Mon, Feb 05, 2007 at 01:36:35PM -0700, Eric Shubes wrote:
> > Yes, at least in ksh. I'm sure bash can do it, too. In ksh you use "<<-"
> > instead of "<<" and it will strip any leading tabs from there here doc.
> > Note that it's TABS not WHITESPACE. So it's possible to have internal
> > indenting with spaces, but tab indented shell script.
> > 
> 
> I just looked it up for yuks. bash appears to be the same. So, indent the
> EOF with tabs, and meaningful indentation should be done with spaces. I
> wonder how long I can remember that. ;)

When I need it I have to look up how. Every time. Usually if I use a
here doc I separate it with *vertical* whitespace and then work with
no indent. Maintaining something where tabs v. spaces are significant is
too much work for me.

-- 
Darrin Chandler                   |  Phoenix BSD Users Group
dwchandler at stilyagin.com          |  http://bsd.phoenix.az.us/
http://www.stilyagin.com/darrin/  |


More information about the PLUG-discuss mailing list