bug-bash
[Top][All Lists]
Advanced

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

FW: RE: cd multiple levels up?


From: Christopher Bratusek
Subject: FW: RE: cd multiple levels up?
Date: Sun, 13 Jun 2010 15:43:48 +0200
User-agent: freenetMail

... Sorry, I forgot that my webmailer doesn't handle MLs correctly.
 
-----weitergeleitete Nachricht-----
 Von: "Christopher Bratusek" address@hidden
 Gesendet: So. 13.06.10 (15:42)
 An: "Peng Yu" address@hidden
 Betreff: RE: cd multiple levels up?

You may check this one:
 
up () {
    [ "${1/[^0-9]/}" == "$1" ] && {

    local ups=""

    for i in $(seq 1 $1)
    do
        ups=$ups"../"
    done
    cd $ups
    }
}
 
eg.: `up 4'
 
Regards
Chris

-----weitergeleitete Nachricht Ende-----


freenetMail mobil – Alle E-Mails auf Ihrem Handy versenden und empfangen.
Jetzt kinderleicht und kostenlos einrichten. Hier informieren!

reply via email to

[Prev in Thread] Current Thread [Next in Thread]