number of working days


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting number of working days
# 1  
Old 08-19-2008
number of working days

Hi There,

Can you help me writing an unix script which tells me number of working days between two dates. say d1 and d2. The answer should be Integer.

is it possible in Unix.

cheers,
# 2  
Old 08-20-2008
Read the FAQ articles? https://www.unix.com/answers-frequent...rithmetic.html
If so, please give an example of the date formats you are using and your attempt so far.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Linux froze and got back working 5 days later, no reboot.

Hello my friends, I've come across the weirdest of glitches. I'm running a simple weather monitor (just temperature) on a Raspbeery Pi 3B (Raspbian Linux 4.14.98-v7+). It has a 3G modem that sends out simple packets to my server at home. On june 5th I lost remote access to the device.... (1 Reply)
Discussion started by: OmahaWiz
1 Replies

2. Shell Programming and Scripting

Get number of days between 2 dates

Gents. Please can u help. I would like to calculate the days between two dates. Example file1 ( previous date) file1 - Input file 9/29/2010 10195 9/29/2010 1057 2/2/2016 10 2/2/2016 10169 2/2/2016 1057 2/3/2016 10005 2/3/2016 10014 In file2 I add the actual date using this code.... (9 Replies)
Discussion started by: jiam912
9 Replies

3. Shell Programming and Scripting

Working out days of the week and processing file in 3 working days

Hi guys i need advice on the approach to this one...... I have a file say called Thisfile.20130524.txt i need to work out from the date 20130524 what day of the week that was and then process the file in 3 working days. (so not counting saturday or sunday....(will not worry about bank... (2 Replies)
Discussion started by: twinion
2 Replies

4. Shell Programming and Scripting

Number of days in current month

I have a homework assignment: ---------------------------------------- "Display" the number of days in the current month. For example: September 1996 has 30 days ---------------------------------------- I am trying to just display the head of cal to start the sentence. eg. cal | head ... (1 Reply)
Discussion started by: eaafuddy
1 Replies

5. Shell Programming and Scripting

Enter number of days and get calender

Friends need assistance in getting a script either on shell or perl. Below is the situation Taking Today's calender into consideration with Month,Day,Year current .Using that i would like give number of days to get its month,day,year for future or past calender depending on the + or - days... (8 Replies)
Discussion started by: ajayram_arya
8 Replies

6. Shell Programming and Scripting

Delete a directory after X number of days

Hi How do I remove a directory which are some days old . For Ex : $ cd /WMID/data/temp/TxTest/Dev/txStore $ ls -ltr total 0 drwxr-xr-x 3 wmethods wmapp 80 Jul 21 03:36 0AE445C4 drwxr-xr-x 3 wmethods wmapp 80 Jul 21 04:00 0AE44664 drwxr-xr-x 3 wmethods... (6 Replies)
Discussion started by: leo76
6 Replies

7. Shell Programming and Scripting

Number of days in month from certain parameters

Hi, I have an issue in date processing, the issue is I have a month as an int ( 1 - 12 ), the weekday as int ( 0 - 6 , 0 = Sunday), and the week day in month as int ( 0 - 5, 5 = last ex: first sunday, last monday, third tuesday ... ), now from those three parameters is there a possible way to... (5 Replies)
Discussion started by: modn3
5 Replies

8. Shell Programming and Scripting

Get number of days between given dates

Hi I need one single command to get number of days between two given dates.datecalc is not working. ex. fromdate:01.04.2010 todate :24.04.2010 i should get the out put as 23 Thanks in advance (4 Replies)
Discussion started by: suryanarayana
4 Replies

9. UNIX for Advanced & Expert Users

Number of days between two distinct dates

Hi I'm looking for a .ksh script/function that will calculate ONLY the number of days between two distinct dates. Further convert the number of days to weeks and display. I need this to be part of another larger script that checks the password expiry on several servers and notifies the... (1 Reply)
Discussion started by: radheymohan
1 Replies

10. Shell Programming and Scripting

Calc number of days in a month

Looking for some help on capturing the number of days in a month to set as a loop counter. Any ideas, please let me know. (3 Replies)
Discussion started by: flounder
3 Replies
Login or Register to Ask a Question