To find day out of date in HP-unix

Thread Tools Search this Thread
Operating Systems HP-UX To find day out of date in HP-unix
# 1  
Old 09-23-2009
To find day out of date in HP-unix

Dear Frends,

Could you please help me with the command or option by which I can find
day where the input is date(can be of future or past).

I do have for linux, However it is not working @ hp unix.

Please help.

# 2  
Old 09-23-2009
Is this what you tried: date +%d
# 3  
Old 09-23-2009
no no... actually it should give ... whether it is monday or tuesday or wed......

suppose if I give, 23-09-2008, it should give tuesday...

For Linux I am using the following :

CHKDT=`date -d $LIMGDT +%a`

however hp unix it is not working....
# 4  
Old 09-23-2009
That is not what date does or is for in unix (non standard...) have you checked it works on other platforms? (I just done AIX and SOLARIS...) look at the man pages...

---------- Post updated at 14:27 ---------- Previous update was at 14:23 ----------

I you used this forum the way you agreed to when joining, you would have, using the search tool, found this great thread for a start:

Last edited by vbe; 09-23-2009 at 09:26 AM.. Reason: spelling...
# 5  
Old 10-16-2009
You are looking for a feature that comes in GNU Date which is what you are using in Linux. You can get it from the HP-UX Porting Centre in the GNU Core Utils depot.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Replace date in file every day with current date

I Have text like XXX_20190908.csv.gz need to replace Only date in this format with current date every day Thanks! (1 Reply)
Discussion started by: yamasani1991
1 Replies

2. Shell Programming and Scripting

How to get the consecutive last 10 week day date using UNIX ksh shell scripting?

Hi, i am writing a ksh shell script to check the last month end date whether it is falling in last 10 week day date, I am not sure How to use "Mr. Perderabo's date calculator", Could you Please let me know how to use to get my requirement, I tried my own script but duplicate week day and... (5 Replies)
Discussion started by: karthikram
5 Replies

3. Shell Programming and Scripting

How to find the date of previous day in shell script?

Hi Experts, i am using the below code get the date of previous day. #!/usr/bin/ksh datestamp=`date '+%Y%m%d'` yest=$((datestamp -1)) echo $yest When i execute the code i am getting output as: 20130715 What i am trying here is, based on the date passed i am fetching previus day's... (0 Replies)
Discussion started by: learner24
0 Replies

4. Shell Programming and Scripting

find files for next day of the date entered

i have few files generated everyday with a date stamp. Sometimes it happens that if the files are generated late i.e after 00:00 hrs the date stamp will be of the next day. example: 110123_file1 110123_file2 110123_file3 110124_file4 in the above example file4 is also for the previous... (2 Replies)
Discussion started by: gpk_newbie
2 Replies

5. Shell Programming and Scripting

finding the previous day date and creating a file with date

Hi guys, I had a scenario... 1. I had to get the previous days date in yyyymmdd format 2. i had to create a file with Date inthe format yyyymmdd.txt format both are different thanks guys in advance.. (4 Replies)
Discussion started by: apple2685
4 Replies

6. Shell Programming and Scripting

Script to find previous month last day minus one day timestamp

Hi All, I need to find the previous month last day minus one day, using shell script. Can you guys help me to do this. My Requirment is as below: Input for me will be 2000909(YYYYMM) I need the previous months last day minus 1 day timestamp. That is i need 2000908 months last day minus ... (3 Replies)
Discussion started by: girish.raos
3 Replies

7. Shell Programming and Scripting

Function to find day of any given date.

Hi, Is there any function in Unix by which v can find the exact day of any given date. Like i need to get Wednesday if i give 05 07 2008 (format MM DD YYYY) Thanks, RRVARMA (5 Replies)
Discussion started by: RRVARMA
5 Replies

8. UNIX for Dummies Questions & Answers

How to find Day of the Week from the given date (Perl)?

How to find the Day of the Week of the given Date using perl? If I have a date in YYY--MM-DD format, how to find the DOW? Based on that, I need to find the following sunday. Pls help. (5 Replies)
Discussion started by: deepakwins
5 Replies

9. Shell Programming and Scripting

How to find the first day of previous month in unix?

How to find the first day of previous month in unix mmddyyyy format? example : today is 07052007 (in mmddyyyy) output sud be 06012007 thanks mohapatra (10 Replies)
Discussion started by: mohapatra
10 Replies

10. Shell Programming and Scripting

Write a shell script to find whether the first day of the month is a working day

Hi , I am relatively new to unix... Can u pls help me out to find out if the first day of the month is a working day ie from (Monday to Friday)...using Date and If clause in Korn shell.. This is very urgent. Thanks for ur help... (7 Replies)
Discussion started by: phani
7 Replies
Login or Register to Ask a Question