[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] Preferred method wrapping mkdir
From: |
Chet Ramey |
Subject: |
Re: [Help-bash] Preferred method wrapping mkdir |
Date: |
Fri, 13 Nov 2015 12:01:03 -0500 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
On 11/13/15 11:55 AM, Joseph Pesco wrote:
> Hello;
>
> I've developed a passion for wrapping mkdir up in a utility function.
> Is there a reason for not using either of the following two methods to
> do it? Is there a better method I've not thought of?
Write a function named `mkdir' and use `command mkdir' inside it to call
mkdir from $PATH (or simply use /usr/bin/mkdir if you are sure that is
where it is).
It doesn't matter where you define it as long as it is available where
you need it. Either way, you don't need aliases. If you go the shell
script route, you will need to use the full pathname inside that script.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU address@hidden http://cnswww.cns.cwru.edu/~chet/