- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- helo command date script
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
Forums
Discussions
Discussions
Discussions
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
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
01-11-2007 01:32 AM
01-11-2007 01:32 AM
example : number of the week :
#date +%W
so , I want to obtain I number of week for the date example 2006/12/08
thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2007 01:42 AM
01-11-2007 01:42 AM
Re: helo command date script
get yourself
A. Clay's caljd program from
http://mirrors.develooper.com/hpux/
(right at the bottom of the page)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2007 01:49 AM
01-11-2007 01:49 AM
Re: helo command date script
I was recently trying to figure out the day number of the year for specific dates and couldn't seem to find a way so I'll be interested to see what sort of answers come of this.
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2007 01:54 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2007 02:04 AM
01-11-2007 02:04 AM
Re: helo command date script
Please clarify how you define 'weeknumber'.
Is it simple the a chunk of 7 days?
An ISO week?
- weeks start on a monday
- week 1 of a given year is the one that includes the first Thursday of that year. (or, equivalently, week 1 is the week that includes 4 January.)
Google for 'week number' and you'll find many write ups. This suggests you probably want to use a package like the perl above rather then code up some shell script and get it wrong for next a leap year or whatever.
hth,
Hein.
One example:
http://www.proesite.com/timex/wkcalc.htm
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2007 02:11 AM
01-11-2007 02:11 AM
Re: helo command date script
Pete, you are correct - no direct option to do this. I thought the julian day difference could be used (Too simplistic, it seems)
Jairo,
http://www.computing.net/unix/wwwboard/forum/7128.html has got a ksh script, but apparently some potential problem.
So I'd go with James's perl solution, if perl is ok.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2007 01:27 AM
01-12-2007 01:27 AM
Re: helo command date script
I use the C program mktime on HP-UX to obtain the week number ISO-8601:
$ mktime -D 2007-12-31 -F %w
1
You can get it here:
http://fresh.t-systems-sfr.com/unix/src/privat2/mktime-2.3.tar.gz/
HTH,
Art