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

Re: Aiuto bash (dir corrente)



On Thu, 18 Jan 2007 (18:35), butterfly wrote:
> mi servirebbe avere la directory corrente in una variabile.

Guarda questa (ma va bene solo con bash):
echo ${PWD#${PWD%/*}/}

puoi anche ottenere le ultime due directory:
echo ${PWD#${PWD%/*/*}/}

Per i dettagli:
man bash

Ciao,
-- 
Daniele                 JID: dan@jabber.linux.it (http://www.jabber.org)
and remember: respect is everything . . . . . . . . . . . free your mind

Attachment: signature.asc
Description: Digital signature


Reply to: