Email address obfuscation in effect -- please
click here to turn it off.
[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
- To: "MLUG Members" <EMAIL:PROTECTED>
- Subject: Re: [MLUG] shell script - find shell script parent directory?
- From: "Robert Citek" <EMAIL:PROTECTED>
- Date: Tue, 4 Mar 2008 21:51:37 -0600
- Delivery-date: Tue, 04 Mar 2008 21:51:58 -0600
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=r4wyADoiV2dkR2TehUcw3Hfq36inX8POQUuwDH5QQPY=; b=daMgHLcWmhA/2p3Ae6DWnI+jEhLciDy00Lizii/w7pFfQvyGsd3jqPG0tADdnimO+wlnN6cv6fFaHbBaKWxy961al3swUGTPtruwUk6dR3J8EBglLme3/JCyjZHvbil8zxuoX2F7kDlDtCVBFADk3ML2dXTKUq7sRWDDId3SYCs=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Umnbvuih1VrhnbPM0kjJXUHdDAdlGY7artrYhXkAh/Ey1149AX5weGZE5KbIOg1aCh4dTSbTTCqfedGgbc7u3LLqXoDvIt9KVIiTenuzO5SqIGb9DeShadOTYYnlxSsPbTPEt2ys3KI1aCEkoT+V9uf8gYG7bFi3/SdcDzj2qEY=
- Envelope-to: EMAIL:PROTECTED
- In-reply-to: <EMAIL:PROTECTED>
- References: <EMAIL:PROTECTED> <EMAIL:PROTECTED> <EMAIL:PROTECTED> <EMAIL:PROTECTED> <EMAIL:PROTECTED> <EMAIL:PROTECTED>
- Reply-to: MLUG Members <EMAIL:PROTECTED>
- Sender: EMAIL:PROTECTED
On Tue, Mar 4, 2008 at 1:12 PM, Mike Miller <EMAIL:PROTECTED> wrote:
> Suppose you want to make a directory name that begins with "-". Will this
> work?
>
> mkdir \-X
>
> Nope. A few days ago, I thought it would, but it doesn't. This is where
> the "--" argument comes in:
>
> mkdir -- -X
>
> That works.
Prefacing the directory with ./ also works:
$ mkdir ./-X
> The same trick works for "cd", so we're up to this:
Unfortunately, prepending ./ is not "generic" enough to work for cd.
Thus the need for '--'.
> > Can you over-ride that from happening? In any case, a horrible hack
> > would be to parse the output of "which", which should report that these
> > are built-ins. Note: I don't have a appropriate test bed here at work
> > for any of this.
Actually, "which" wouldn't be enough as it doesn't distinguish between
builtin commands, functions, and aliases. Thus the need for
"builtin".
Regards,
- Robert
_______________________________________________
members mailing list
EMAIL:PROTECTED
http://mlug.missouri.edu/mailman/listinfo/members