[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
p=$(echo $m|sed 's/./& /g') possible with only p=${m...} ?
From: |
Dan Jacobson |
Subject: |
p=$(echo $m|sed 's/./& /g') possible with only p=${m...} ? |
Date: |
24 Nov 2001 10:07:44 +0800 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 |
>> $ a=(123 456);echo ${a[@]/#/1}
>> 1123 1456
>>
>> one might have never thought this possible, due to the manual only
>> saying: [..]
P> No, it says more than that: [..]
ok, getting over my head. Anyways, I bet bash doesn't have something
like sed's &, \1, \2... yet [so please add it maybe.]
$ m=123456; p=$(echo $m|sed 's/./& /g');echo $p
1 2 3 4 5 6
--
http://www.geocities.com/jidanni/ Tel+886-4-25854780