Sponsored Content
Full Discussion: Get Quarter Date
Top Forums UNIX for Dummies Questions & Answers Get Quarter Date Post 302483027 by anurag.singh on Thursday 23rd of December 2010 10:26:26 AM
Old 12-23-2010
My mistake, corrected in previous post. Now displayed format is: yyyy-mm-dd
This is just a rearrangement of format specifier in printf along with associated values.

Last edited by anurag.singh; 12-23-2010 at 11:38 AM..
 

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

How can i calculate a Quarter of a Month

I im just a beginner here. I wanted to know how to calculate the Quarter of a Month, and i want to assign Number like if the month falls on 1st quarter then i have to assign to 1 then going on till the last Quarter!! Any help will be much use to me.. ~Renne (2 Replies)
Discussion started by: pidu_rak
2 Replies

2. UNIX for Dummies Questions & Answers

code to identify the New Quarter

I am a sql programmer, I don't know much about UNIX. I want to modify the existing unix script ----------------------------------------------------------------- ............ cd /home/location/file set timing on sqlplus user/$IDPW <<! prompt RUNNING NEW QUARTER PROCESSING. PLEASE WAIT.... (1 Reply)
Discussion started by: stefani
1 Replies

3. Shell Programming and Scripting

extract the relevant data files for a quarter

CTB_KT_OllyotLvos_20081204_164352_200811.txt CTB_KT_LN_utahfwd_20081204_164352_200811.txt CTB_KT_LN_utahfwd_Summ_20081204_164352_200811.txt CTB_KT_PML_astdt_prFr_20081204_210153_200811.txt CTB_KT_PML_astdt_prOt_20081204_210153_200811.txt CTB_KT_PML_astdt_Nopr_20081204_210153_200811.txt... (7 Replies)
Discussion started by: w020637
7 Replies

4. Shell Programming and Scripting

Generate quarter dates with begin date and end date

Hi All, I am trying to generate quarter dates with user giving input as begin date and end date. Example: Input by user: begin_date = "2009-01-01" end_date = 2010-04-30" required output: 2009-01-01 2009-03-31 09Q01 2009-04-01 2009-06-30 09Q02 . . till 2010-01-01 2010-03-31 10Q01 ... (9 Replies)
Discussion started by: sol_nov
9 Replies

5. UNIX for Dummies Questions & Answers

Find Quarter Start and End Dates

Dear Members, Depending on the current date i should find out the start and end dates of the quarter. ex: Today date is 14-Nov-2011 then Quarter start date should be Oct 1 2011 and Quarter End date should be Dec 31 2011. How can i do this? Thanks Sandeep (1 Reply)
Discussion started by: sandeep_1105
1 Replies

6. Shell Programming and Scripting

Get 1st date of month, week , quarter

Hi , I need to trigger few jobs based on the system date ( in case user is not passing any date to the script. In case passing then need to take the user date). Here is the requirement 1. Everyday call daily script 2. On 1st day of week call weekly script 3. On 1st day of month call... (4 Replies)
Discussion started by: Anupam_Halder
4 Replies

7. Shell Programming and Scripting

Cron job - Need to run Cron every quarter at particular time

Hi, 1) If some job supposed to run on 1st of every month at 7 AM In cron job when we have a blackout on the 1st ( i.e when 1st falls on a sunday ) how can we make the job run the next business day? 2) How can we run a job on 25th of every quarter 7 AM(jan,apr,jul,oct) And if 25th... (5 Replies)
Discussion started by: System Admin 77
5 Replies

8. Shell Programming and Scripting

Shell Script to Loop through Quarter dates

Hi, Trying to automate a Postgres query using Shell script Every month 1st week has to run a Monthly Queries to generate delimited files. July 1st start of fiscal yr which has 4 Quarters until next June 30th Example If I'm running on Sept 5th it has to generate one file(Becuase it... (12 Replies)
Discussion started by: krux_rap
12 Replies

9. Linux

How to calculate the quarter end date according to the current date in shell script?

Hi, My question is how to calculate the quarter end date according to the current date in shell script? (2 Replies)
Discussion started by: Divya_1234
2 Replies
XPRINTF_DOMAIN(3)					   BSD Library Functions Manual 					 XPRINTF_DOMAIN(3)

NAME
copy_printf_domain, free_printf_domain, new_printf_domain, register_printf_domain_function, register_printf_domain_render_std -- extensible printf domains SYNOPSIS
#include <printf.h> printf_domain_t copy_printf_domain(printf_domain_t domain); void free_printf_domain(printf_domain_t domain); printf_domain_t new_printf_domain(void); int register_printf_domain_function(printf_domain_t domain, int spec, printf_function *render, printf_arginfo_function *arginfo);, void *context int register_printf_domain_render_std(printf_domain_t domain, const char *specs); DESCRIPTION
A printf domain is an extensible printf (see xprintf(5)) structure defining a set of conversion specifiers that will be used in calls to the routines discussed in xprintf(3) and xprintf_comp(3). Domains can be modified independently of one another, and do not affect the behavior of the normal printf calls in printf(3). To create a new domain, call new_printf_domain(); the standard POSIX conversion specifiers are defined by default. To make a copy of an existing domain, use copy_printf_domain(). When a domain is no longer needed, call free_printf_domain() to release the associated memory. The register_printf_domain_function() function is used to add, modify or remove conversion specifiers for a given domain. The spec argument is the specifier character, which can be any printable (non-control) ASCII character, except for those characters that are used as flag/option characters. The set of flag/option characters includes the space character, and the following: # $ ' * + , - . 0 1 2 3 4 5 6 7 8 9 : ; L _ h j l q t v z Two user-defined callback function must also be given; see xprintf(5) for a description of these callback functions and an example of use. Setting either or both callbacks to NULL deletes the given specifier from the domain. Note that while it is permissible to redefine the standard conversion specifiers, it is not usually recommended as it may cause confusion. The register_printf_domain_render_std() function is used to add pre-defined conversion specifiers to the given domain. The specs argument is a null-terminated C string containing one or more of the following specifier characters: H Hex dump. The 'H' specifier takes two arguments; the first is a pointer to the data to dump, while the second argument is the length of the data, given as type unsigned. Normally, 16 characters are displayed per line, as pairs of hex characters separated by spaces. Speci- fying a field width less than 16 will display that number of characters per line. Setting the '+' (showsign) flag will prefix each line with the hex offset of the beginning character in that line. Setting the '#' (alternate form) flag will postfix an ASCII representation to each line, with '.' representing non-printable characters. M Errno. The 'M' specifier displayed the text representation of the given int argument, expected to be a valid errno value (as returned by strerror(3)). Invalid errno values are represent by the ``errno='' string followed by the decimal and hex values of the argument. Q Quoted. The 'Q' specifier displays a null-terminated string argument as a C string, with leading and trailing double quotes. Newlines, carriage-returns and tabs are represented by ' ', ' ' and ' ', respectively, while backslashes and double quotes are preceeded with a backslash. All other whitespace characters not including space itself (those in which isspace(3) returns true) are displayed as octal escape sequences (a backslash followed by three octal digits). All other characters print as themselves. T time_t/timeval/timespec. The 'T' specifier displays the three types of time values as a single decimal value. The argument should be a pointer to the time value to be converted. Setting the appropriate flags indicates which type is indicated: ll The 'll' (long long) flag indicates the argument points to a struct timespec structure. The default precision is 9. l The 'l' (long) flag indicates the argument points to a struct timeval structure. The default precision is 6. (none) By default, the argument points to a time_t value. The default precision is 0 (the fractional part is not displayed). If the '#' (alternate form) flag is specified, the value is displayed in years, days, hours, minutes and seconds, as in: ``3y123d21h59m59s.987654'' (zero values are not displayed at all). Note that the years are 365 days (no leap days). V String vis. The 'V' specifier uses strvisx(3) to display the null-terminated C string argument. The precision value can be used to limit the amount of the string that is processed (defaults to the entire string). Flag values can be used to obtain different encodings: + The '+' (showsign) flag uses the ``VIS_WHITE | VIS_HTTPSTYLE'' flag value to strvisx(3). 0 The '0' (leading zero) flag uses the ``VIS_WHITE | VIS_OCTAL'' flag value to strvisx(3). # The '#' (alternate form) flag uses the ``VIS_WHITE'' flag value to strvisx(3). (none) The default flag value to strvisx(3) is ``VIS_WHITE | VIS_CSTYLE | VIS_OCTAL''. RETURN VALUES
The new_printf_domain() and copy_printf_domain() functions return the new domain, or NULL on failure (usually out of memory condition). The register_printf_domain_function() and register_printf_domain_render_std() return zero on success and -1 on failure (usually due to an improper specifier character or out of memory condition). SEE ALSO
printf(3), strvisx(3), xprintf(3), xprintf_comp(3), xprintf(5) Darwin Aug 19, 2012 Darwin
All times are GMT -4. The time now is 09:09 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy