- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Script with Date Calc
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-21-2009 01:32 AM
тАО05-21-2009 01:32 AM
Script with Date Calc
I am trying to make a script that would create some data for the next five days of the week in five different folders with names of the DAYS.
The script has to be run once a week, say Monday.
The problem is how shall I increment the date parameter to get next five DAY?
Thanks,
UniRock
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-21-2009 02:18 AM
тАО05-21-2009 02:18 AM
Re: Script with Date Calc
http://mirrors.develooper.com/hpux/caljd-2.25.sh
You'll need to learn to use it.
Credits for that script to A. Clay Stephenson.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-21-2009 02:35 AM
тАО05-21-2009 02:35 AM
Re: Script with Date Calc
i will give you one example
i want to create every day one file with name "file.date" for example today is 21-05-09 so the file will be file.210509 next day will be file.220509 and so on
just do
touch /tmp/file.`date +%d%m%y`
thanks
kamal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-21-2009 03:03 AM
тАО05-21-2009 03:03 AM
Re: Script with Date Calc
Its easy to take today's date and make a directiory,
you can increment the day also by adding 1 into current date.
problem is comming when month is ending.
Suraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-21-2009 06:41 PM
тАО05-21-2009 06:41 PM
Re: Script with Date Calc
Actually I want to increment the day and not the date everytime, Monday, Tuesday and so on.
Thanks,
UniRock.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-21-2009 08:43 PM
тАО05-21-2009 08:43 PM
Re: Script with Date Calc
Any preferred implementation language?
If it is always run on Monday, and only the weekday is a variable, then you don't really need to know the actual date right?
Just pick them from a list... using perl:
$ perl -e '@days=qw(Mon Tue Wed Thu Fri); for (@days) { qx(cp x.dat $_)}'
'
Or, instead of coding up the list, look for the directories:
perl -e 'for (<*day>) { next unless -d; s/\..*$//; qx(cp x.dat $_) }'
Hope this helps some,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-27-2009 07:23 PM
тАО05-27-2009 07:23 PM