Hello I would like to ask for help with a script to search a directory that contains many log files and based on a users input after being prompted, they enter a date range down to the hour which searches the files that contain that range.
I dont know how to go about this. I am hoping that the user would be prompted by entering the hour to search but that wont work when the day changes and you have a number of files of separate days but same hour.
Would the user need to enter a variable for each date component "enter year, enter month, enter day, enter hour and then the script searches the best range of files
XSLog$YYYY.$MM.$dd-$hh.01.00.txt - if this is the best way how could this be done based on the log file format below?
I hope it makes sense what I am asking.
Thankyou
Last edited by lostincashe; 03-30-2012 at 06:09 AM..
:confused: Hi i am a noob and need a little help to finish my shell script. I am learning as i go but hit a problem.
I am search thorugh logs(*.rv) files to find entires between two user defined dates,
The script so far looks for the "START" and "END" of each entry at sees if it belongs To... (0 Replies)
Hi all,
Iam writing a script, which will extract all the files from Start_Date to End_Date. Files are date stamped as YYYYMMDD. For ex:
Start_Date='20051001'
End_Date='20060331'
extract files such as........
ramp_20050810.rpt
ramp_20050915.rpt
ramp_20051001.rpt
ramp_20051010.rpt... (2 Replies)
I have a file (status.file) of the form:
valueA 3450
valueB -20
valueC -340
valueD 48
I am tailing a data.file, and need to search and modify a value
in status.file...the tail is:
tail -f data.file | awk '{ print $3, ($NF - $(NF-1)) }'
which will produce lines that look like this:
... (3 Replies)
Ok, I have a script with a commandline option that allows the user to add a custom function to the script file. I have tried everything in my limited knowledge of sed to get this to work and keep coming up short. I need sed to search for a line starting with a pattern, I've got that part so far,... (0 Replies)
Hi,
Currently I am working on a script to automate the process of converting the log file from binary into text format. To achieve this, partly I am depending on my application’s utility for this conversion and the rest I am relying on shell commands to search for directory, locate the file and... (5 Replies)
Hi, i am very new to php Is it possible to display Range of date depend on user input day
example:
user input 2 day start from 28/4/12 it will add 2 day from date of input
so display should look like this
28/4/12 to 30/4/12
then from 30/412 user add another 4 date so will... (0 Replies)
Hi,
I'm quite new to ksh scripting, can someone help me with this.
Requirements:
I need to create a script that list the files from a user input date range.
e. g. format of file:
*c1*log.2012-12-22-14-00*
*c1*log.2012-12-22-14-00*
*c1*log.2012-12-22-14-00*... (1 Reply)
My unix version is IBM AIX Version 6.1
I tried google my requirement and found the below answer,
find . -newermt “2012-06-15 08:13" ! -newermt “2012-06-15 18:20"
But newer command is not working in AIX version 6.1 unix
I have given my requirement below:
Input:
atr files:
... (1 Reply)
In the below bash a file is downloaded when the program is opened and then that file is searched based on user input and the result is written to a new file.
For example, the bash is opened and the download.txt is downloaded, the user then enters the id (NA04520). The id is used to search... (5 Replies)
STATS_CDF_BETA(3) 1 STATS_CDF_BETA(3)stats_cdf_beta - CDF function for BETA Distribution. Calculates any one parameter of the beta distribution given values for the others.SYNOPSIS
float stats_cdf_beta (float $par1, float $par2, float $par3, int $which)
DESCRIPTION
Method Cumulative distribution function (P) is calculated directly by code associated with the following reference. DiDinato, A. R. and
Morris, A. H. Algorithm 708: Significant Digit Computation of the Incomplete Beta Function Ratios. ACM Trans. Math. Softw. 18 (1993),
360-373. Computation of other parameters involve a search for a value that produces the desired value of P. The search relies on the mono-
tonicity of P with the other parameter. Note The beta density is proportional to t^(A-1) * (1-t)^(B-1) Arguments P -- The integral from 0
to X of the chi-square distribution. Input range: [0, 1]. Q -- 1-P. Input range: [0, 1]. P + Q = 1.0. X -- Upper limit of integration of
beta density. Input range: [0,1]. Search range: [0,1] Y -- 1-X. Input range: [0,1]. Search range: [0,1] X + Y = 1.0. A -- The first parame-
ter of the beta density. Input range: (0, +infinity). Search range: [1D-100,1D100] B -- The second parameter of the beta density. Input
range: (0, +infinity). Search range: [1D-100,1D100] STATUS -- 0 if calculation completed correctly -I if input parameter number I is out of
range 1 if answer appears to be lower than lowest search bound 2 if answer appears to be higher than greatest search bound 3 if P + Q .ne.
1 4 if X + Y .ne. 1 BOUND -- Undefined if STATUS is 0 Bound exceeded by parameter number I if STATUS is negative. Lower search bound if
STATUS is 1. Upper search bound if STATUS is 2.
PARAMETERS
o $par1
-
o $par2
-
o $par3
-
o $which
- Integer indicating which of the next four argument values is to be calculated from the others. Legal range: 1..4 which = 1 :
Calculate P and Q from X,Y,A and B which = 2 : Calculate X and Y from P,Q,A and B which = 3 : Calculate A from P,Q,X,Y and B which
= 4 : Calculate B from P,Q,X,Y and A
RETURN VALUES
STATUS -- 0 if calculation completed correctly -I if input parameter number I is out of range 1 if answer appears to be lower than lowest
search bound 2 if answer appears to be higher than greatest search bound 3 if P + Q .ne. 1 4 if X + Y .ne. 1
PHP Documentation Group STATS_CDF_BETA(3)