Skip to main content
Post Closed as "Duplicate" by Jeff Schaller, Rui F Ribeiro, G-Man Says 'Reinstate Monica', Thomas, agc
edited title
Source Link

unix shell script - extracting result from two .txt files (time operation)

I have two text files. One file has startdatetime and second file have enddatetime.

file 1 data(startdate-time):

2019-01-08 04:14:59
2019-01-08 04:16:57

file 2 data(enddate-time):

2019-01-08 04:15:50
2019-01-08 04:17:02

I need Unix script which will perform operation on endtime - starttime (only on time). Example for first entry it should perform:

04:15:50 - 04:14:59

and give result in seconds (for this example, it should print out the number 51total difference seconds).

unix shell script - extracting result from two .txt files

I have two text files. One file has startdatetime and second file have enddatetime.

file 1 data(startdate-time):

2019-01-08 04:14:59
2019-01-08 04:16:57

file 2 data(enddate-time):

2019-01-08 04:15:50
2019-01-08 04:17:02

I need Unix script which will perform operation on endtime - starttime (only on time). Example for first entry it should perform:

04:15:50 - 04:14:59

and give result in seconds (for this example, it should print out the number 51).

unix shell script - extracting result from two .txt files (time operation)

I have two text files. One file has startdatetime and second file have enddatetime.

file 1 data(startdate-time):

2019-01-08 04:14:59
2019-01-08 04:16:57

file 2 data(enddate-time):

2019-01-08 04:15:50
2019-01-08 04:17:02

I need Unix script which will perform operation on endtime - starttime (only on time). Example for first entry it should perform:

04:15:50 - 04:14:59

and give result in seconds (for this example, it should print total difference seconds)

Rollback to Revision 3 - ksh
Source Link

I have two text files.  One One file has startdatetime and the second file hashave enddatetime.

file 1 data  (startdate-time):

2019-01-08 04:14:59
2019-01-08 04:16:57

file 2 data  (enddate-time):

2019-01-08 04:15:50
2019-01-08 04:17:02

I need a Unix script which will perform operation on endtime − starttime - starttime (only on time). For example,Example for the first entry it should perform:

04:15:50 - 04:14:59

and give result in seconds (for this example, it should print out the number 51).

I have two text files.  One file has startdatetime and the second file has enddatetime.

file 1 data  (startdate-time):

2019-01-08 04:14:59
2019-01-08 04:16:57

file 2 data  (enddate-time):

2019-01-08 04:15:50
2019-01-08 04:17:02

I need a Unix script which will perform operation on endtime − starttime (only on time). For example, for the first entry it should perform:

04:15:50 - 04:14:59

and give result in seconds (for this example, it should print out the number 51).

I have two text files. One file has startdatetime and second file have enddatetime.

file 1 data(startdate-time):

2019-01-08 04:14:59
2019-01-08 04:16:57

file 2 data(enddate-time):

2019-01-08 04:15:50
2019-01-08 04:17:02

I need Unix script which will perform operation on endtime - starttime (only on time). Example for first entry it should perform:

04:15:50 - 04:14:59

and give result in seconds (for this example, it should print out the number 51).

Fix spelling and grammar.
Source Link

I have two text files. One  One file has startdatetime and the second file havehas enddatetime.

file 1 data  (startdate-time):

2019-01-08 04:14:59
2019-01-08 04:16:57

file 2 data  (enddate-time):

2019-01-08 04:15:50
2019-01-08 04:17:02

I need a Unix script which will perform operation on endtime - starttime − starttime (only on time). ExampleFor example, for the first entry it should perform:

04:15:50 - 04:14:59

and give result in seconds (for this example, it should print out the number 51).

I have two text files. One file has startdatetime and second file have enddatetime.

file 1 data(startdate-time):

2019-01-08 04:14:59
2019-01-08 04:16:57

file 2 data(enddate-time):

2019-01-08 04:15:50
2019-01-08 04:17:02

I need Unix script which will perform operation on endtime - starttime (only on time). Example for first entry it should perform:

04:15:50 - 04:14:59

and give result in seconds (for this example, it should print out the number 51).

I have two text files.  One file has startdatetime and the second file has enddatetime.

file 1 data  (startdate-time):

2019-01-08 04:14:59
2019-01-08 04:16:57

file 2 data  (enddate-time):

2019-01-08 04:15:50
2019-01-08 04:17:02

I need a Unix script which will perform operation on endtime − starttime (only on time). For example, for the first entry it should perform:

04:15:50 - 04:14:59

and give result in seconds (for this example, it should print out the number 51).

added 12 characters in body
Source Link
slm
  • 379.7k
  • 127
  • 793
  • 897
Loading
Source Link
Loading