Date arithmetic in Unix shell scripts.
date --date="1 days ago" "+%a"
Tags: unix math shell scripting date
Source: By ggasp as answer to the question
This code snippet was collected from stackoverflow, and is licensed under CC BY-SA 2.5
Related code-snippets:
- Difference between Math.Floor() and Math.Truncate().
- How can I get the value of in a loop?
- Is gettimeofday() guaranteed to be of microsecond resolution?
- Localising Date format descriptors: A set of localised descriptors for localising the date format in an existing format.
- I want to solve a linear equation. How can I do that?
- How do I get root permission for my file inside vi?
- A little diversion into floating point (im)precision, part 1 | 1 – 0 | 1 | 1 | 1 | 1 | 1 | 1 | 2 | 1 | 1 | 2 | 1 | 2 | 1 | 1 | 2 | 1 | 2 | 3 | 4 | A little diversion into floating point (im)precision, part 1 | 3 | 4 | 5 | 5 | 8 | 8 | 2 | 3 | 4 | 7 | 8 | 7 | 7 | 7 | 6 | 1 | 1 | 5 | 1
- How can I map a latitude/longitude on a distorted map?
- How do I call shell commands in Ruby?
- What does the term "BODMAS" mean?
- Windows Equivalent of 'nice'.
- Can I use Xming X Window Server over a VPN?
- What are the best ways to wrap up a work day?
- Making a production build of a PHP project with Subversion?
- How can I kill Linux processes older than a certain age?