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

Re: Slightly OT: sed & reguläre ausdruecke - ich peil's nicht



Hallo Gregor,

----[ '/tmp/michelle.konzack.S3tclD/test.sh' ]--------------------------
#!/bin/bash

ID=compass

MSG="<version>
       <launcher>1.0.3</launcher>
       <compass>4.2.1</compass>
       <calculation>4.2.4</calculation>
       <externalfunctions>4.2.2</externalfunctions>
       <printhtml>1.0</printhtml>
       <webclient>4.11.10</webclient>
       <webpublisher>1.19</webpublisher>
</version>"

echo -e "${MSG}" |grep "${ID}" |sed "s|.*<${ID}>\(.*[.0-9]\)</${ID}>|\1|"
------------------------------------------------------------------------

Getestet und funktioniert.


Thanks, Greetings and nice Day
    Michelle Konzack
    Systemadministrator
    Tamay Dogan Network
    Debian GNU/Linux Consultant


-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/
##################### Debian GNU/Linux Consultant #####################
Michelle Konzack   Apt. 917                  ICQ #328449886
                   50, rue de Soultz         MSN LinuxMichi
0033/6/61925193    67100 Strasbourg/France   IRC #Debian (irc.icq.com)

Attachment: signature.pgp
Description: Digital signature


Reply to: