I collect data in a file in below format(Month Day Year Size) in RedHat Linux. Now i want to calculate the data size date wise. As i code shell script after long time, i forgot the features and syntax. Can anyone help me regard this please.
---------- Post updated at 11:24 AM ---------- Previous update was at 10:57 AM ----------
Data collected for only 5 days. So, i have to calculate with more data (for single day, may be 5-10 entry)
---------- Post updated at 11:48 AM ---------- Previous update was at 11:24 AM ----------
Output format will be like this:
Last edited by Scrutinizer; 02-12-2014 at 01:53 AM..
Reason: code tags
Hi Friends,
Can any one help with this:
I have a huge file with the format as
A SAM 4637
B DEPT1 4758 MILAN
A SMITH 46585
B DEPT2 5385 HARRYIS
B SAMUL 63547 GEORGE
B DANIEL 899 BOISE
A FRES 736 74638
I have to read this file and write only the records that starts with "B" only
... (5 Replies)
Hi,
I have a comma separated file with millions of records in it.
I have a requirement to split the file based on the value in a one of the columns.
Suppose i have a text file with columns like C1, C2,C3,C4
Column C4 can hold the values either 01 or 02 03 or 04.
I nned to extract... (2 Replies)
Hi,
I am new to unix shell programming.
I want to write a shell script for a functionality existing in mainframe system.
I have one file as below as input
123456
&__987
&12yuq
abcdef
_ referes to blank
condition:whenever the input file is having &__ ,it should be replaced... (4 Replies)
Hi
i am new to scripting. i have a file file.dat with content as :
CONTENT_STORAGE PERCENTAGE FLAG:
/storage_01 64% 0
/storage_02 17% 1
I need to update the value of FLAG for a particular CONTENT_STORAGE value
I have written the following code
#!/bin/sh
threshold=20... (1 Reply)
Hi, Gurus,
I got a problem to resolve following issue:
I have one file file1as following:
start_dt=2010-01-01 12:00:02
start_dt=2011-01-01 09:00:02
start_dt=2009-01-01 11:00:02I have another file file2 as following:
title1, 2010-01-03 10:00:02
title2, 2011-01-04 11:00:02
title3,... (5 Replies)
I am generating a output:
Name Count_1 Count_2
abc 12 12
def 15 14
ghi 16 16
jkl 18 18
mno 7 5
I am sending the output in html email, I want to add the code:
<font color="red"> NAME COLUMN record </font>
for the Name... (8 Replies)
Hi.. I'm into a bump after trying to solve this prob.. i've a file with contents like below.
<blankline>
'pgmId' : 'UNIX',
'pgmData' : 'textfile',
'author' : 'admin',
.......
Now i'm trying to insert a new data after pgmId. so the final output will be... (7 Replies)
hi
i have my input data like this
aaa bbb ccc
asa dff nmj
mnj saa dff
oik
aax cdx saa
oik
asq sdf dssi want my output file to be like this
mnj saa dff oik
aax cdx saa oiki want to retain only those lines which will have oik just below them and i want oik to be as next column to those... (1 Reply)
Hi,
I have a flaty file from which i am fetching few columns in tablular form as below code.
Now i want to fetch the column 6 and 7 in below code only if it either of them is non zero.However below startement
awk -F, '$6==0 && $7==0{exit 1}' ${IFILE}
is not working..Not sure where is the... (36 Replies)
HI Guys,
I have below input.
Output Base on Below Condition.
1> if forth column is empty and next coming line have same name with \es then add that column name on all rows
2>rest of all are es:vsDataEUtranCellFDD
Input:-
CCL01736 CCL01736_7A_1 es:vsDataEUtranCellFDD ... (3 Replies)
Discussion started by: pareshkp
3 Replies
LEARN ABOUT NETBSD
todr_gettime
TODR(9) BSD Kernel Developer's Manual TODR(9)NAME
todr_attach, todr_gettime, todr_settime, clock_ymdhms_to_secs, clock_secs_to_ymdhms -- time-of-day clock support
SYNOPSIS
#include <dev/clock_subr.h>
void
todr_attach(todr_chip_handle_t);
int
todr_gettime(todr_chip_handle_t, struct timeval *);
int
todr_settime(todr_chip_handle_t, struct timeval *);
void
clock_secs_to_ymdhms(int, struct clock_ymdhms *);
time_t
clock_ymdhms_to_secs(struct clock_ymdhms *);
DESCRIPTION
The todr_*() functions provide an interface to read, set and control 'time-of-day' devices. A driver for a 'time-of-day' device registers
its todr_chip_handle_t with machine-dependent code using the todr_attach() function. Alternatively, a machine-dependent front-end to a
'time-of-day' device driver may obtain the todr_chip_handle_t directly.
The todr_gettime() retrieves the current data and time from the TODR device and returns it in the struct timeval storage provided by the
caller. todr_settime() sets the date and time in the TODR device represented by todr_chip_handle_t according to the struct timeval argument.
The utilities clock_secs_to_ymdhms() and clock_ymdhms_to_secs() are provided to convert a time value in seconds to and from a structure rep-
resenting the date and time as a <year,month,day,weekday,hour,minute,seconds> tuple. This structure is defined as follows:
struct clock_ymdhms {
u_short dt_year; /* Year */
u_char dt_mon; /* Month (1-12) */
u_char dt_day; /* Day (1-31) */
u_char dt_wday; /* Day of week (0-6) */
u_char dt_hour; /* Hour (0-23) */
u_char dt_min; /* Minute (0-59) */
u_char dt_sec; /* Second (0-59) */
};
Note: leap years are recognised by these conversion routines.
RETURN VALUES
The todr_*() functions return 0 if the requested operation was successful; otherwise an error code from <sys/errno.h> shall be returned.
However, behaviour is undefined if an invalid todr_chip_handle_t is passed to any of these functions.
The clock_ymdhms_to_secs() function returns -1 if the time in seconds would be less that zero or too large to fit in a time_t. The
clock_secs_to_ymdhms() function never fails.
SEE ALSO intersil7170(4), mk48txx(4), inittodr(9), resettodr(9), time_second(9)BSD September 6, 2006 BSD