Please see this


Contents

- INDEX
- HP-UX Index
- Solaris
- Linux Index
- Other Unix types
- General Unix
- Unix Networking
- Unix Scripts
- Unix databases

Associated Information

- none

Useful Links

- GAWK Manual
- Sed resources

Getting yesterday's or tommorrow's date

It is often necessary to work out yesterdays or tommorrows dates in scripts. Here's an easy way to do it.

#!/bin/sh Yesterday=`TZ=PST+24 date +%D` echo "Yesterday is:" $Yesterday Tomorrow=`TZ=PST-24 date +%D` echo "Tomorrow is:" $Tomorrow Today=`date +%D` echo "Today is:" $Today

Copyright 2000 Intronet Computers Ltd
Email: Intronet Computers for enquiries