Thanks for the site. That find command is very handy and powerful but I am not sure I can use it in my case.
Some problems I have are.
-That the directory contains upto 2 weeks of files.
-Can contain other file types and I only want it to search the XSLogxxxxx files.
-The user will type in a day and hour to search on.
-From that user input, the script then searches the small range of files based on date and hour for whatever data they need.
I was thinking of using the user input after being prompted for "year" "month" "day" and "hour" and using the variables of those to produce the file range to search on.
I have not tried this but would this be an approach ?
Thankyou for any advice better methods or examples
: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)
STRIPCHART(5) File Formats Manual STRIPCHART(5)NAME
stripchart - draws diagrams from data with PHP
SYNOPSIS
The script is expected to be called as a CGI script but also works from the command line.
DESCRIPTION
Stripchart prepares a series of diagrams directly from raw data. It is handy for web pages that need some graphics without too much over-
head.
OPTIONS -i input FILE
name of input data file (mandatory)
-o output FILE
name of output .gif file (default: STDOUT)
-O output FILE
name of output .gif file, also dumps to STDOUT
-f from TIME
stripchart with data starting at TIME (default: 24 hours ago)
-t to TIME
stripchart with data ending at TIME (default: now)
-r range RANGE
stripchart data centered around "from" time the size of RANGE (overrides -t)
-l last LINES
stripchart last number of LINES in data file (overrides -f and -t and -r)
-T title TITLE
title to put on graphic (default: FILE RANGE)
-x column X
time or "x" column (default: 2)
-y column Y
value or "y" column (default: 3)
-Y column Y'
overplot second "y" column (default: none)
-b baseline VALUE
overplot baseline of arbitrary value VALUE
-B baseline-avg
overrides -b, it plots baseline of computed average
-d dump low VALUE
ignore data less than VALUE
-D dump high VALUE
ignore data higher than VALUE
-v verbose
puts verbose runtime output to STDERR
-L log makes y axis log scale
-c colors "COLORS"
set gnuplot colors for graph/axisnts/data (default: "xffffff x000000 xc0c0c0 x00a000 x0000a0 x2020c0" in order: bground, axisnts,
grids, pointcolor1,2,3)
-C cgi output CGI header to STDOUT if being called as CGI
-s stats
turn extra plot stats on (current, avg, min, max)
-j julian times
time columns is in local julian date (legacy stuff)
-V version
print version number and exit
-h help
display this help
NOTES
* TIME either unix date, julian date, or civil date in the form:
YYYY:MM:DD:HH:MM (year, month, day, hour, minute)
If you enter something with colons, it assumes it is civil date
If you have a decimal point, it assumes it is julian date
If it is an integer, it assumes it is unix date (epoch seconds)
If it is a negative number, it is in decimal days from current time
(i.e. -2.5 = two and a half days ago)
* All times on command line are assumed to be "local" times
* All times in the data file must be in unix date (epoch seconds)
* RANGE is given in decimal days (i.e. 1.25 = 1 day, 6 hours)
* if LINES == 0, (i.e. -l 0) then the whole data file is read in
* columns (given with -x, -y, -Y flags) start at 1
* titles given with -T can contain the following key words which will
be converted:
FILE - basename of input file
RANGE - pretty civil date range (in local time zone)
the default title is: FILE RANGE
AUTHORS
Matt Lebofsky
2.21 November 2002 STRIPCHART(5)