[colug-432] Portable Visible Tabs in Shell Scripts
Seth Hall
seth at icir.org
Tue Aug 9 20:50:06 EDT 2011
On Aug 9, 2011, at 6:48 PM, jep200404 at columbus.rr.com wrote:
> Unfortunately, it seems to be a bashism and to not work in
> (plain) bourne shells.
> I've been trying to find a portable way of _visibly_ putting
> tab characters in shell scripts.
My hacky solution if you want or need it visibly...
TAB=`printf "\t"`
echo "${TAB}This is indented"
Of course, I think that using {} for string interpolation is another bash-ism but you can do it other ways.
.Seth
--
Seth Hall
International Computer Science Institute
(Bro) because everyone has a network
http://www.bro-ids.org/
More information about the colug-432
mailing list