10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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
2. UNIX for Dummies Questions & Answers
Hi,
I have below text file
wer,r5yut,dfy5y,dytry
w45w,vbjjbh,xfsd,ctfyuk
xdte56,rty6r,r645,976fd
w34r,dtyer,d5tyty,fdyrt
I want to get an O/P the enter rows for example if I enter 2, the first row should print
output
wer,r5yut,dfy5y,dytry
w45w,vbjjbh,xfsd,ctfyuk (4 Replies)
Discussion started by: stew
4 Replies
3. Shell Programming and Scripting
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
4. Shell Programming and Scripting
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
5. Shell Programming and Scripting
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
6. Shell Programming and Scripting
Hi all. I am scripting in a POSIX shell on HPUX.
I am running a script that needs to determine the number of days in a month.
I found this on the forum and it works great:
X=`cal $(date +%m) $(date +%Y) | grep -v '' | wc -w`
The issue is that I am running the script on the 7th day of... (11 Replies)
Discussion started by: lyoncc
11 Replies
7. Shell Programming and Scripting
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
8. Shell Programming and Scripting
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, (1 Reply)
Discussion started by: rahulkav
1 Replies
9. UNIX for Advanced & Expert Users
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
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