10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi everyone,
I've an issue trying to soustracte two dates, e.g:
d1=$(date -d "Nov 18, 2017" +%s)
d2=$(date +%s) # Today we are 2017-11-16
echo "$(( (d1 - d2) / 86400 ))"
Output:
1
I don't understand why it doesn't work. for me, it should give "18 - 16 = 2".
Much appreciated... (1 Reply)
Discussion started by: Arnaudh78
1 Replies
2. Shell Programming and Scripting
Dear All
I need to find out day diff between two dates. date -d or date -- day is not working in mine system.
Currently i am using below code but it gives me wrong value while month change.
IP:
Date 1: 20150802 11:30:45
Date 2: 20150728 16:30:45
code used:
awk '{t1=$2; t2=$4;... (7 Replies)
Discussion started by: jaydeep_sadaria
7 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I'm a newbie at programming in Unix, and I seem to have a task that is greater than I can handle. Trying to learn awk by the way (but in the end, i just need something that works). My goal is to compare two files and output the difference between the two. I've been reading, and I think I... (5 Replies)
Discussion started by: legato22
5 Replies
4. UNIX for Dummies Questions & Answers
I have two files A and B. I want to create file C which is A - B. I am currently using
grep -v -f B A > C
Is there a more efficient way. Files A and B are both large files
Thanks (3 Replies)
Discussion started by: chrisjones
3 Replies
5. Shell Programming and Scripting
Hello,
I've created the script below to compare the content of two files with a delay of an hour. After an hour, the lines that exist in both files, will be printed and executed.
The script now uses a counter to countdown 50 minutes. But what I would prefer is to check the file timestamp of... (3 Replies)
Discussion started by: taipan
3 Replies
6. Linux
Hi,
One script is giving the date which is not contstant. and the need is to compare it with the current one and find the diff. if it is less than 15 days , need to send an e-mail.
Date format coming from the script is October 24, 2055
Thanks (1 Reply)
Discussion started by: nagendramv
1 Replies
7. Shell Programming and Scripting
the o/p is :
Start Time:
2008-02-19 00:13:16,338
End Time:
2008-02-19 23:43:17,974
How to find the diff in time..........? (1 Reply)
Discussion started by: ali560045
1 Replies
8. UNIX for Advanced & Expert Users
Hi
I would like to find the diff between two folders:
Ex:
Folder:1
html.java
go.java
ten.java
Folder:2html.java
go.java
ten.java
you.java
Questions comes:
Folder:1 contains a files with old version, know the files were modified and updated with the new version in Folder2.
I... (2 Replies)
Discussion started by: gkrishnag
2 Replies
9. UNIX for Dummies Questions & Answers
Hi ,
Can somebody please help me with this.
The date format is in MM/DD/YY HH24:MI:SS
suppose I have a start_date=09/03/02 04:15:02
& Finish date= 09/04/02 07:13:51
I want to find out the difference between the two ie finish_time-start time.
How can I do this.
Morever I want the... (2 Replies)
Discussion started by: rooh
2 Replies
10. Shell Programming and Scripting
What kind of command can i use to search a directory and subdirectories for all files that do not have the same date? i want to find any files that do not match a date of Sep 13, 2002? Or that have a different owner or group?
Any help appreciated! (2 Replies)
Discussion started by: kymberm
2 Replies