[ale] expanding $(echo -e "$word\t$word")

Adrin haswes at mindspring.com
Sat Jan 26 09:43:07 EST 2002


This sort of works.   But takes more than it probably should to do it

#!/bin/bash
# This is a test script to test \t
TAB="\t\t\t\t\t"
echo -e  "1"$TAB"2"$TAB"3"$TAB"4"$TAB"5"$TAB"6"$TAB"7"$TAB"8"$TAB"9"

Adrin


-----Original Message-----
From: Geoffrey [mailto:esoteric at 3times25.net]
To: ale at ale.org
Sent: Saturday, January 26, 2002 8:56 AM
To: ale
Subject: Re: [ale] expanding $(echo -e "$word\t$word")

It's that lousy bash :(, it works with ksh... :)

Sorry, didn't note the shell being used...

James P. Kinney III wrote:

> That doesn't work.
> [jkinney at archimedes jkinney]$ rpm -q bash
> bash-2.04-21
> [jkinney at archimedes jkinney]$ export word="test"
> [jkinney at archimedes jkinney]$ echo $word
> test
> [jkinney at archimedes jkinney]$ export line="$word\t$word"
> [jkinney at archimedes jkinney]$ echo "$line"
> test\ttest
> [jkinney at archimedes jkinney]$ echo $line
> test\ttest
>
>
> On Sat, 2002-01-26 at 08:40, Geoffrey wrote:
>
>>I think you're working too hard on it
>>
>>line="$word\t$word"
>>
>>as long as you print $line with quotes around it as in:
>>
>>echo "$line"
>>
>>You should get your tab as expected
>>
>>David S. Jackson wrote:
>>
>>
>>>When I go line=`echo -e $word"\t"$word`; echo $line I only get a
>>>single space for the \t.  I've tried the following to no avail:
>>>
>>>line=$(echo -e $word"\t"$word)
>>>line=`echo -e "$word\t$word"`
>>>line=`echo -e $word"\t"$word`
>>>
>>>and they all expand to only one space.  I want the \t to expand
>>>to a full tab space.  What am I doing wrong?  (Using bash 2.x).
>>>
>>>TIA.
>>>
>>>
>>>
>>
>>--
>>Until later: Geoffrey         esoteric at 3times25.net
>>
>>"...the system (Microsoft passport) carries significant risks to users
that
>>are not made adequately clear in the technical documentation available."
>>- David P. Kormann and Aviel D. Rubin, AT&T Labs - Research
>>- http://www.avirubin.com/passport.html
>>
>>
>>---
>>This message has been sent through the ALE general discussion list.
>>See http://www.ale.org/mailing-lists.shtml for more info. Problems should
be
>>sent to listmaster at ale dot org.
>>
>>


--
Until later: Geoffrey           esoteric at 3times25.net

"...the system (Microsoft passport) carries significant risks to users that
are not made adequately clear in the technical documentation available."
- David P. Kormann and Aviel D. Rubin, AT&T Labs - Research
- http://www.avirubin.com/passport.html


---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be
sent to listmaster at ale dot org.


---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
sent to listmaster at ale dot org.






More information about the Ale mailing list