Find the answer to your Linux question:
Results 1 to 2 of 2
Hi All, I am pretty good at bash programing now what I want to do is read in the date strip it down to day month year like 30/05/06 how ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2006
    Location
    UK, Devon
    Posts
    41

    Bash Scripting striping date (Fixed)


    Hi All,
    I am pretty good at bash programing now what I want to do is read in the date strip it down to day month year like 30/05/06 how would I go about doing this.

    So basicly read in "date" then strip..... any ideas would be good.

  2. #2
    Just Joined!
    Join Date
    Jun 2004
    Location
    Portugal
    Posts
    47
    The date command already does this. Try

    Code:
    date +%d/%m/%y
    for the format you specified.

    Try:

    Code:
    man date
    for other possible formats.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •