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

Re: Fragen zu Shell-Skripten



Hello Peter Schütt,

Am 2012-03-05 19:38:47, hacktest Du folgendes herunter:
> Gegeben ist eine Datei mysource mit folgendem Header
> %title: Ein beliebiger Titel
> %date: 2001-12-23
> Irgendwelcher Text

> TITLE=`MagicScriptForTitle.sh mysource`
> DATE=`MagicScriptForDate.sh mysource`

TITLE=$(grep --regexyp="%title:" mysource |sed -e 's|.*: \(.*\)|\1|' -e 's|_| |g')
DATE=$(grep  --regexyp="%date:"  mysource |sed -e 's|.*: \(.*\)|\1|' -e 's|_| |g')

> Mittels "basename" komme ich an den einfachen Dateinamen.
> Wie komme ich an das Verzeichnis?

dirname

Thanks, Greetings and nice Day/Evening
    Michelle Konzack

-- 
##################### Debian GNU/Linux Consultant ######################
   Development of Intranet and Embedded Systems with Debian GNU/Linux
               Internet Service Provider, Cloud Computing
                <http://www.itsystems.tamay-dogan.net/>
                  <http://www.debian.tamay-dogan.net/>

itsystems@tdnet                     Jabber  linux4michelle@jabber.ccc.de
Owner Michelle Konzack

Gewerbe Strasse 3                   Tel office: +49-176-86004575
77694 Kehl                          Tel mobil:  +49-177-9351947
Germany                             Tel mobil:  +33-6-61925193  (France)

USt-ID:  DE 278 049 239

Linux-User #280138 with the Linux Counter, http://counter.li.org/

Attachment: signature.pgp
Description: Digital signature


Reply to: