in reply to Directory creation with current Date

Why not just do  mkdir `date "+%d-%B-%Y"`

Replies are listed 'Best First'.
Re^2: Directory creation with current Date
by renz (Scribe) on Jan 19, 2005 at 15:44 UTC

    This also serves as a reply to ninja_byte as well. Your solutions will not work, since you ignored the fact that Sam said he was on Win2k. While Win2k does have a date program, it does not function like the *ix date.

    Example:

    C:\perl\bwb>mkdir `date "+%d-%B-%Y"` C:\perl\bwb>dir Volume in drive C has no label. Volume Serial Number is 34D5-1CFA Directory of C:\perl\bwb 01/19/2005 09:36a <DIR> . 01/19/2005 09:36a <DIR> .. 01/19/2005 09:36a <DIR> +%d-%B-%Y` ... 01/19/2005 09:36a <DIR> `date

    Now you have two new directories with stupid names. What was wrong with the strftime() solution that this is preferable?

    /renz.

    P.S. -

    C:\perl\bwb>awk 'awk' is not recognized as an internal or external command, operable program or batch file.

    Update: Cleaned up html.
    Perhaps: I should rephrase third sentence of first paragraph.. Seems as if I'm blaming the entire thing on `date` when that is not exactly the truth..
    # rz/020805