|
From: | Pierre Gaston |
Subject: | Re: smart indented HERE docs |
Date: | Mon, 22 Aug 2016 08:58:05 +0300 |
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 0 9 8
Testing 7 6 5
Testing 4 3 2
EOF
Note the above here-doc is tabbed out by two but the closing delimiter
is only tabbed by 1 so only 1 tab is removed.
Would result with:
Testing 0 9 8
Testing 7 6 5
Testing 4 3 2
This would allow you to write here-docs inside functions and continue to
use tabs to maintain proper formatting and not have to use spaces.
[Prev in Thread] | Current Thread | [Next in Thread] |