Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi all! We have been experiencing an issue on site where threads have been missing the latest postings. The platform host Vanilla are working on this issue. A workaround that has been used by some is to navigate back from 1 to 10+ pages to re-sync the thread and this will then show the latest posts. Thanks, Mike.
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Linux : Date command

  • 27-07-2006 3:20pm
    #1
    Moderators, Recreation & Hobbies Moderators Posts: 10,912 Mod ✭✭✭✭


    Linus noob here. I have to use one at work but until last month I had never even turned a linux machine on :)

    I had a script run by crontab each evening to send a file to a client by cft (like ftp). The name of the file changes daily absed on the date.

    I've worked out that
    CFTDATE=D`date +\%d\%m\%y`
    

    assigns 260706 to the variable CFTDATE which is just perfect.

    What I need now is a way to easily come up with yesterdays date.

    Any ideas?



    EDIT: I've found the --date (1 day ago) command which does return yesterdays date but not in the form I need i.e. %d%m%y


Comments

  • Closed Accounts Posts: 437 ✭✭Yook


    This should work for ya:

    'date --date=yesterday +\%d\%m\%y'


  • Moderators, Recreation & Hobbies Moderators Posts: 10,912 Mod ✭✭✭✭Ponster


    Yook wrote:
    This should work for ya:

    'date --date=yesterday +\%d\%m\%y'

    That's just beautiful !

    Now I can leave early and go watch Superman Returns :)


    Cheers !


Advertisement