Sponsored Content
Top Forums Shell Programming and Scripting Need help looking for missing hours. Post 302817293 by fsanchez on Wednesday 5th of June 2013 01:58:17 PM
Old 06-05-2013
Let me start off by saying thank your to Jotne and RudiC for your quick and helpful answers, I greatly appreciate it

To RudiC's question:
Correct the first 0000 should count up to 2345 in increments of 15 minutes for example: 0000 , 0015, 0030, 0045, 0100, 0115

so the time lines will look like this:
Code:
0000-0600-0015-0600
0015-0600-0030-0600
0030-0600-0045-0600
0045-0600-0100-0600
0100-0600-0115-0600
0115-0600-0130-0600
0130-0600-0145-0600
0145-0600-0200-0600

and so on up to the final report of the day being
Code:
2345-0600-0000-0600


Last edited by Scrutinizer; 06-05-2013 at 03:49 PM.. Reason: code tags
 

10 More Discussions You Might Find Interesting

1. Post Here to Contact Site Administrators and Moderators

Have we just had a rollback of a few hours?

Have we just had a rollback of a few hours? (1 Reply)
Discussion started by: porter
1 Replies

2. Shell Programming and Scripting

how to list files between last 6 hours to 3 hours

Hi Frens, I want to list some files from a directory, which contains "DONE" in their name, i am receiving files every minute. In this i want to list all the files which are newer than 6 hours but older than 3 hours, of current time i dont want my list to contain the latest files which are ... (4 Replies)
Discussion started by: Prat007
4 Replies

3. What is on Your Mind?

How Many hours on Computer?

How many hours you spend on Computer in a day??? (10 Replies)
Discussion started by: malcomex999
10 Replies

4. Shell Programming and Scripting

CurrentTime-4 hours

Hi, Good Afternoon! I am writing this script on "sh" and have Variables as below. #Time in hours ex: 09 JobTime=`echo $StartTime |awk '{print $2}'|cut -f1 -d':'` SystemHours=`date +%H` How can go 4 hours back for each variable in a day? Another Question? JobStat=`dsjob -report... (5 Replies)
Discussion started by: rajubollas
5 Replies

5. AIX

cron off by 5 hours

stupid question im sure, but its frustrating My cron jobs are off by 5 hours. My system time is right but all of my cron jobs are running approximately 5 hours late. Any idea why? (4 Replies)
Discussion started by: mshilling
4 Replies

6. Shell Programming and Scripting

ps -ef |grep 24 hours

I need to grep PIDs older than 24 hours (1 day) or more. ps -ef |grep ??? Please advise. (10 Replies)
Discussion started by: Daniel Gate
10 Replies

7. Shell Programming and Scripting

Get the no of hours between days

Hi, i have a date 1- 2013101511 date2 -2013101812 need toget the no of hours between them,can any one tellme the logic. (6 Replies)
Discussion started by: sandeep karna
6 Replies

8. SuSE

How to resolve missing missing dependencies with opensuse 11.3 and 12.3?

Hello, This is a programming question as well as a suse question, so let me know if you think I should post this in programming. I have an application that I compiled under opensuse 12.2 using g77-3.3/g++3.3. The program compiles and runs just fine. I gave the application to a colleague who... (2 Replies)
Discussion started by: LMHmedchem
2 Replies

9. Red Hat

Yum - resolving missing dependencies that are not missing

I am trying to install VirtualBox on RHEL 5 but I need the 32 bit version for 32 bit Windows. When I run yum I get the following: sudo yum localinstall /auto/spvtg-it/spvss-migration/Software/VirtualBox-4.3-4.3.2_90405_el6-1.i686.rpm Loaded plugins: fastestmirror Setting up Local Package... (13 Replies)
Discussion started by: gw1500se
13 Replies

10. UNIX for Beginners Questions & Answers

Fill in missing hours and interpolate values using awk.

I have a time series data like this 40754,35.6931,51.3092,201610160700,21.0 40754,35.6931,51.3092,201610160800,23.0 40754,35.6931,51.3092,201610160900,24.0 40754,35.6931,51.3092,201610161000,24.0 40754,35.6931,51.3092,201610161300,25.0 40754,35.6931,51.3092,201610161400,23.0... (6 Replies)
Discussion started by: emirzaei
6 Replies
MKSTEMP(3)						     Linux Programmer's Manual							MKSTEMP(3)

NAME
mkstemp, mkostemp, mkstemps, mkostemps - create a unique temporary file SYNOPSIS
#include <stdlib.h> int mkstemp(char *template); int mkostemp(char *template, int flags); int mkstemps(char *template, int suffixlen); int mkostemps(char *template, int suffixlen, int flags); Feature Test Macro Requirements for glibc (see feature_test_macros(7)): mkstemp(): _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE >= 500 || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED || /* Since glibc 2.12: */ _POSIX_C_SOURCE >= 200112L mkostemp(): _GNU_SOURCE mkstemps(): _BSD_SOURCE || _SVID_SOURCE mkostemps(): _GNU_SOURCE DESCRIPTION
The mkstemp() function generates a unique temporary filename from template, creates and opens the file, and returns an open file descriptor for the file. The last six characters of template must be "XXXXXX" and these are replaced with a string that makes the filename unique. Since it will be modified, template must not be a string constant, but should be declared as a character array. The file is created with permissions 0600, that is, read plus write for owner only. The returned file descriptor provides both read and write access to the file. The file is opened with the open(2) O_EXCL flag, guaranteeing that the caller is the process that creates the file. The mkostemp() function is like mkstemp(), with the difference that flags as for open(2) may be specified in flags (e.g., O_APPEND, O_SYNC). The mkstemps() function is like mkstemp(), except that the string in template contains a suffix of suffixlen characters. Thus, template is of the form prefixXXXXXXsuffix, and the string XXXXXX is modified as for mkstemp(). The mkostemps() function is to mkstemps() as mkostemp() is to mkstemp(). RETURN VALUE
On success, these functions return the file descriptor of the temporary file. On error, -1 is returned, and errno is set appropriately. ERRORS
EEXIST Could not create a unique temporary filename. Now the contents of template are undefined. EINVAL For mkstemp() and mkostemp(): The last six characters of template were not XXXXXX; now template is unchanged. For mkstemps() and mkostemps(): template is less than (6 + suffixlen) characters long, or the last 6 characters before the suffix in template were not XXXXXX. These functions may also fail with any of the errors described for open(2). VERSIONS
mkostemp() is available since glibc 2.7. mkstemps() and mkostemps() are available since glibc 2.11. CONFORMING TO
mkstemp(): 4.3BSD, POSIX.1-2001. mkstemps(): unstandardized, but appears on several other systems. mkostemp() and mkostemps(): are glibc extensions. NOTES
In glibc versions 2.06 and earlier, the file is created with permissions 0666, that is, read and write for all users. This old behavior may be a security risk, especially since other UNIX flavors use 0600, and somebody might overlook this detail when porting programs. POSIX.1-2008 adds a requirement that the file be created with mode 0600. More generally, the POSIX specification of mkstemp() does not say anything about file modes, so the application should make sure its file mode creation mask (see umask(2)) is set appropriately before calling mkstemp() (and mkostemp()). The prototype for mktemp() is in <unistd.h> for libc4, libc5, glibc1; glibc2 follows POSIX.1 and has the prototype in <stdlib.h>. SEE ALSO
mkdtemp(3), mktemp(3), tempnam(3), tmpfile(3), tmpnam(3) COLOPHON
This page is part of release 3.53 of the Linux man-pages project. A description of the project, and information about reporting bugs, can be found at http://www.kernel.org/doc/man-pages/. GNU
2012-12-21 MKSTEMP(3)
All times are GMT -4. The time now is 10:52 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy