[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [OT] bash e sostituzione carattere "%"



ZaFx wrote:
(Comunque senza passare per sed non si può fare... la bash insomma ha

Una soluzione un po' macchinosa potrebbe essere la seguente:
NEWNAME="${OLDNAME%\%3a*}:${OLDNAME##*%3a}"

Silvano Sartore wrote:

On Wed, Dec 10, 2003 at 04:02:05PM +0100, ZaFx wrote:
ma il meccanismo di pattern substitution ${gcc_4%3a3.3.1-2_i386.deb//%3a/:} non funziona, essendo il "%" un (ho provato anche \%3a e altre combinazioni ma nisba).

NEWNAME=`echo $OLDNAME|sed 's/%3a/:/'`
--
Guido Bozzetto      - http://E-Company.it/gb/ - GB@Nauta.it
GTN S.P.A.          - http://www.gtngroup.it/ - info@Nauta.it
Viale Tricesimo 181 - Ph.: +39 0432 499311
I-33100 Udine (UD)  - Fax: +39 0432 45366
Italy               - Systems & Network Administrator - CCDA



Reply to: