01-17-2011
Date Query
I need to generate a report on the first of each month that will show me how many points are going to expire on a particular scheme for the next three months. The points expiry is not an issue what I have an issue with is finding the command to give me the last day of each month for the current and the next two.
So for example if I ran the query on 1st Feb I would need...
28/02/2011
31/03/2011
30/04/2011
Obviously this will move on one month each month,
Any help would be appreciated.
Thanks
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi there,
I am trying to do the following in Unix (Solaris 2.7):
1...Find the actual date 7 days ago in format (dd-mmm-yyyy) and with the weekday prefably,
2...Find the date 5 days after the above in the same format.
How can I do this in Unix instead of accessing our Oracle database and... (5 Replies)
Discussion started by: csong2
5 Replies
2. UNIX for Dummies Questions & Answers
Good day folks,
This is my first post on this board and I thank you in advance for helping me with this issue.
Any idea how I can synchronize server time with another timeserver but have my server lag behind by 2 seconds?
Meaning...I need a simple unix script that I can run as crone that... (2 Replies)
Discussion started by: franklo
2 Replies
3. Shell Programming and Scripting
Hi
Do you have any pointers how to validate numbers (not to contain alphabets and special characters) and date(MM/DD/YYYY) format.
I used following regular expression to validate integer, which is not working in the default shell:
nodigits="$(echo $testvalue | sed 's/]//g')"
... (4 Replies)
Discussion started by: alok_jax
4 Replies
4. Shell Programming and Scripting
I would like to use the result of a query in another query. How do I redirect/add the output to another variable?
$result = odbc_exec($connect, $query);
while ($row = odbc_fetch_array($result)) {
echo $row,"\n";
}
odbc_close($connect);
?>
This will output hostnames:
host1... (0 Replies)
Discussion started by: hazno
0 Replies
5. Shell Programming and Scripting
Hi,
I wrote a simple shell script which accepts the input value yearmonth in the format YYYYMM and displays the date as YYYY-MM-DD.Day will be 01 always.Please find the code below
#!/bin/ksh
export yearmonth_date=$1
print_usage() {
echo "usage: ${0##*/} <yearmonth_date> \n" \
... (1 Reply)
Discussion started by: kavithakuttyk
1 Replies
6. Shell Programming and Scripting
When I write
Select date_field from TableA fetch first row only
I am getting the output as 09/25/2009.
I want to get the output in the below format
2009-09-25 i.e., MM-DD-YYYY. Please help (7 Replies)
Discussion started by: dinesh1985
7 Replies
7. Shell Programming and Scripting
Hi,
I have a requirement as below which needs to be done viz UNIX shell script
(1) I have to connect to an Oracle database
(2) Exexute "SELECT field_status from table 1" query on one of the tables.
(3) Based on the result that I get from point (2), I have to update another table in the... (6 Replies)
Discussion started by: balaeswari
6 Replies
8. Shell Programming and Scripting
Hi,
I need to query Oracle database for 100 users. I have these 100 users in a file. I need a shell script which would read this User file (one user at a time) & query database.
For instance:
USER CITY
--------- ----------
A CITY_A
B CITY_B
C ... (2 Replies)
Discussion started by: DevendraG
2 Replies
9. Shell Programming and Scripting
Dear all,
I have 2 questions.
I have a file with many rows which has date of the format YYYYMMDD.
1. I need to change the date to that weeks friday date(Ex: 20120716(monday) to 20120720). Satuday/Sunday has to be changed to next week friday date too.
2. After converting the date to... (10 Replies)
Discussion started by: 2001.arun
10 Replies
10. Shell Programming and Scripting
Hi,
I am trying to capture the total run time of a script which contains SQL's by providing date command in top & bottom, it displaying both the times same in top & bottom.However the time in the sql connection is different.Please help.
OS - LINUX
Shell - ksh
printf "Script Started at... (3 Replies)
Discussion started by: nag_sathi
3 Replies
LEARN ABOUT DEBIAN
nfsiostat
nfsiostat(8) System Manager's Manual nfsiostat(8)
NAME
nfsiostat - Emulate iostat for NFS mount points using /proc/self/mountstats
SYNOPSIS
nfsiostat [[<interval>] [<count>]] [<options>][<mount_point>]
DESCRIPTION
The nfsiostat command displays NFS client per-mount statisitics.
<interval>
specifies the amount of time in seconds between each report. The first report contains statistics for the time since each file sys-
tem was mounted. Each subsequent report contains statistics collected during the interval since the previous report.
<count>
If the <count> parameter is specified, the value of <count> determines the number of reports generated at <interval> seconds apart.
if the interval parameter is specified without the <count> parameter, the command generates reports continuously.
<options>
Define below
<mount_point>
If one or more <mount point> names are specified, statistics for only these mount points will be displayed. Otherwise, all NFS
mount points on the client are listed.
OPTIONS
-a or --attr
displays statistics related to the attribute cache
-d or --dir
displays statistics related to directory operations
-h or --help
shows help message and exit
-l LIST or --list=LIST
only print stats for first LIST mount points
-p or --page
displays statistics related to the page cache
-s or --sort
Sort NFS mount points by ops/second
--version
show program's version number and exit
FILES
/proc/self/mountstats
SEE ALSO
iostat(8), mountstats(8), nfsstat(8)
AUTHOR
Chuck Lever <chuck.lever@oracle.com>
15 Apr 2010 nfsiostat(8)