Not sure about the title if someone has a better name for it please lemme know and I will edit the title.
I have several (10+ files) which look something like:
The fields are obviously date, time (hh:m) and lastly occurrences of an event I want to check on a per 10 minute basis
Now as you can tell the event does not necessarily happen in a given 10 minute sample so I have gaps.
Eventually I want to graph this in a spreadsheet which has all the 10 minutes increments from startdate/starttime to enddate/endtime.
So I need to end up with something which changes this into.
I was contemplating having a file "time" which contains every day/10 minute line and merging it somehow but have problems conceptualizing how to make it work.
This is what I tried unsuccessfully (some echo's in there for debugging purpose):
Hope that makes sense.... any input welcome.
You could go with your original thought - generate a file that has all the 10 minute intervals for the day. As you generate the file, grep your other existing files to pull out the lines that match the Date/Timestamp you are working on. Add the value found in the existing file to your total for that time slot.
Here's how it might look. This generate the every-10-minute data (instead of having it already in a file). Also I am going to use standard hh:mm (2-digit minutes) for the time format. You may need to adjust this to match the data in file1 file2
I'm sure others will suggest sexier ways to accomplish this...but hey - it works and can be understood in 2 years when you look at this code again and wonder "what was I doing???".
Hi team...
I need some help/advise on adding a word for a missing column.
I have a file as below.
Rep N1
Forever
Limited
2015
Rep N2
Limited
2016
since 2nd content is 3 lines missing one line so i need to make this like
Rep N1
Forever (3 Replies)
Hi Gurus,
I have a txt file. some record missed 2nd colum value, I need put default value into the file.
ex: below file, first 4 records, missed one column (only 4 columns. it should be 5)
$cat missedfield
aaa,bbb,ccc,fff
aaa,bbb,ccc,ddd
111,222,333,444
111,222,333,444... (3 Replies)
Pattern:
Mary walks at the park every day with her children
sed 's/$/ /'
will make it add 1 space at the end (trailing)
I want to add X ($VARIABLE) number of spaces (which comes from RANDOM)
i.e.
VARIABLE='14'
then it will do:
sed 's/$/ /'
= 14 spaces added at the... (10 Replies)
Issue resolved by upgrading from solaris 11 to solaris 11.1
I would like to enable network mapping.
While using instructions from:
https://blogs.oracle.com/VDIpier/entry/solaris_11_changing_the_hostname
To change my hostname I noticed I am missing the enable mapping bool.
What it should... (0 Replies)
hello all,
I have files that have a specific way for naming the first column
they are make of five names in Pattern of 3
Y = (no case sensitive)
so the files are names $Y-$Y-$Y or $X-$Y-$Z depending how we look
they only exist of the pattern exist
now I want to create a file from them that... (9 Replies)
I need to take a report text file that is output from vendor software and there are some pages which have less then the normal amount of lines. I need to add these missing line feeds as there is a merge program that reads this file in fixed character and line mode template to output the final PDF... (6 Replies)
Hello,
i'm trying to implement the times() function and i'm programming in C.
I'm using the "struct tms" structure which consists of the fields:
The tms_utime structure member is the CPU time charged for the execution of user instructions of the calling process.
The tms_stime structure... (1 Reply)
ladies, gents..
say i have a file that should have 10 fields... (9 delimiters)
some records have 10 fields, some have 5 some have 8, etc.. nothing consistent, but i need my file to have 9 delimiters on each line, even if its null fields..
how can i go line by line and add the correct... (2 Replies)
Hey,
Im trying to format the last command to tell me just the user names, logins, and the time that they were logged in. So far I got the users logins using a loop that counts the amount of times a user logged in but im not sure how to start the time array. The time im trying to use is the last... (2 Replies)