I agree something like this would be nice. Especially if it could handle
spaces (in addition to tabs).
My current solution to this problem is not particularly pretty or elegant:
#!/bin/bash
alias CAT_TO_END="I=\"\${I/*\$'\n'/}\" ; alias START=\"perl -ple 's/^\$I//'
<<'\${I}END' ; unalias START\
On Mon, Aug 22, 2016 at 6:47 AM, Derek Schrock wrote:
>
> Would it be possible to add a new character (+) to the here-doc such
> that the number of tabs remove are the number after the closing
> delimiter (EOF in the above example):
>
>
> cat <<+ EOF
> Testing
I believe this would be a feature request however if this already
exists directly in bash please let me know.
With <<- you can indent a here-doc such that all tabs will be removed.
This can be nice for style reasons in your script however to give the
impression of formatting in the here-doc spaces