There's one thing in your favor -- YYYY MM DD HH MM SS dates sort alphabetically. ls will give you them in date order. Then all you do is an alphabetic < > comparison to see if they're in the range you want...
: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)
oarstat(1) OAR commands oarstat(1)NAME
oarstat - show information about jobs
SYNOPSIS
oarstat [-X|-Y|-J|-D|-f] [-j jobid|--array arrayid] [--sql SQL_properties] [-u user] [--array]
oarstat [-e|-p] [-j jobid | --array arrayid]
oarstat -s [-X|-Y|-J|-D] -j jobid
oarstat [-X|-Y|-J|-D] --gantt "YYYY-MM-DD hh:mm:ss, YYYY-MM-DD hh:mm:ss"
oarstat --accounting "YYYY-MM-DD, YYYY-MM-DD"
DESCRIPTION
This command is used to show information of jobs in OAR batch scheduler.
OPTIONS -f, --full
Very detailed display.
-j, --job job_id
Print information from a specific job.
-e, --events
Print job events only.
-p, --properties
Print job properties in the same format as in the $OAR_RESOURCE_PROPERTIES_FILE file on the nodes.
-s, --state
Print only the state of a specified job. It makes a minimal query to the database. It is optimized to allow scripting for example. Must
be used with -j.
-u, --user [login]
Print information for the current user or the one given. If used with --accounting, print a more detailed accounting report for the
user.
--array [array_id]
Toggle the visualization of array information on. If an array_id is provided, print information relative to the subjobs of the given
array job.
--sql
Restricts display with the SQL where clause on the table jobs (ex: "project = 'p1'")
-D, --DUMPER
Print result in DUMPER format.
-X, --XML
Print result in XML format.
-Y, --YAML
Print result in YAML format.
-J, --JSON
Print result in JSON format.
-g, --gantt "date_start,date_stop"
Print history of jobs and state of resources between two dates like "2006-03-30 13:49:27, 2006-04-30 13:49:27"
--accounting "date_start,date_stop"
Shows accounting information between two dates like "2006-03-30, 2006-04-30".
If --user is also used, more details are shown for this particular user.
Warning: the accounting table must be up to date. The update must be done at superuser level with the oaraccounting command.
-V, --version
Print OAR version number.
-h, --help
Print help message.
SEE ALSO oarprint(1), oarsub(1), oardel(1), oarnodes(1), oarhold(1), oarresume(1)COPYRIGHTS
Copyright 2008 Laboratoire d'Informatique de Grenoble (http://www.liglab.fr). This software is licensed under the GNU Library General Public License. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
oarstat 2012-05-23 oarstat(1)