Sponsored Content
Full Discussion: Query - date command
Top Forums Shell Programming and Scripting Query - date command Post 302785295 by nag_sathi on Monday 25th of March 2013 09:17:46 AM
Old 03-25-2013
Query - date command

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


Code:
printf "Script Started at $date" >> $LOGFILE
sqlplus userid/pwd test1.sql
.
.
.
sqlplus userid/pwd testn.sql
printf "Script Ended at $date" >> $LOGFILE

 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Unix Date query

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

Date change related query

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

Date & NUmber Validation Query

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

Query regarding date field in shell script

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

5. Shell Programming and Scripting

Convertion of Date Format using SQL query in a shell script

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

6. Shell Programming and Scripting

how to obtain date and day of the week from `date` command

Hi, does anybody know how to format `date` command correctly to return the day of the week? Thanks -A I work in ksh.... (1 Reply)
Discussion started by: aoussenko
1 Replies

7. UNIX for Dummies Questions & Answers

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... (2 Replies)
Discussion started by: theref
2 Replies

8. Shell Programming and Scripting

Find week of the year for given date using date command inside awk

Hi all, Need an urgent help on the below scenario. script: awk -F"," 'BEGIN { #some variable assignment} { #some calculation and put values in array} END { year=#getting it from array and assume this will be 2014 month=#getting it from array and this will be 05 date=#... (7 Replies)
Discussion started by: vijaidhas
7 Replies

9. HP-UX

HP/UX command to pull file name/date based on date

HI, Can anyone tell me how to pull the date and file name separated by a space using the find command or any other command. I want to look through several directories and based on a date timeframe (find -mtime -7), output the file name (without the path) and the date(in format mmddyyyy) to a... (2 Replies)
Discussion started by: lnemitz
2 Replies

10. HP-UX

awk command in hp UNIX subtract 30 days automatically from current date without date illegal option

current date command runs well awk -v t="$(date +%Y-%m-%d)" -F "'" '$1 < t' myname.dat subtract 30 days fails awk -v t="$(date --date="-30days" +%Y-%m-%d)" -F "'" '$1 < t' myname.dat awk command in hp unix subtract 30 days automatically from current date without date illegal option error... (20 Replies)
Discussion started by: kmarcus
20 Replies
Locale::Script(3perl)					 Perl Programmers Reference Guide				     Locale::Script(3perl)

NAME
Locale::Script - standard codes for script identification SYNOPSIS
use Locale::Script; $script = code2script('phnx'); # 'Phoenician' $code = script2code('Phoenician'); # 'Phnx' $code = script2code('Phoenician', LOCALE_CODE_NUMERIC); # 115 @codes = all_script_codes(); @scripts = all_script_names(); DESCRIPTION
The "Locale::Script" module provides access to standards codes used for identifying scripts, such as those defined in ISO 15924. Most of the routines take an optional additional argument which specifies the code set to use. If not specified, the default ISO 15924 four-letter codes will be used. SUPPORTED CODE SETS
There are several different code sets you can use for identifying scripts. The ones currently supported are: alpha This is a set of four-letter (capitalized) codes from ISO 15924 such as 'Phnx' for Phoenician. This code set is identified with the symbol "LOCALE_SCRIPT_ALPHA". The Zxxx, Zyyy, and Zzzz codes are not used. This is the default code set. numeric This is a set of three-digit numeric codes from ISO 15924 such as 115 for Phoenician. This code set is identified with the symbol "LOCALE_SCRIPT_NUMERIC". ROUTINES
code2script ( CODE [,CODESET] ) script2code ( NAME [,CODESET] ) script_code2code ( CODE ,CODESET ,CODESET2 ) all_script_codes ( [CODESET] ) all_script_names ( [CODESET] ) Locale::Script::rename_script ( CODE ,NEW_NAME [,CODESET] ) Locale::Script::add_script ( CODE ,NAME [,CODESET] ) Locale::Script::delete_script ( CODE [,CODESET] ) Locale::Script::add_script_alias ( NAME ,NEW_NAME ) Locale::Script::delete_script_alias ( NAME ) Locale::Script::rename_script_code ( CODE ,NEW_CODE [,CODESET] ) Locale::Script::add_script_code_alias ( CODE ,NEW_CODE [,CODESET] ) Locale::Script::delete_script_code_alias ( CODE [,CODESET] ) These routines are all documented in the Locale::Codes man page. SEE ALSO
Locale::Codes Locale::Constants http://www.unicode.org/iso15924/ Home page for ISO 15924. AUTHOR
See Locale::Codes for full author history. Currently maintained by Sullivan Beck (sbeck@cpan.org). COPYRIGHT
Copyright (c) 1997-2001 Canon Research Centre Europe (CRE). Copyright (c) 2001-2010 Neil Bowers Copyright (c) 2010-2011 Sullivan Beck This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2011-09-26 Locale::Script(3perl)
All times are GMT -4. The time now is 07:50 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy