Sponsored Content
Operating Systems Linux How to calculate the quarter end date according to the current date in shell script? Post 303036051 by jgt on Thursday 13th of June 2019 08:46:11 AM
Old 06-13-2019
Assumes of course that your fiscal year end is Dec 31.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

calculate the date of next satureday of current date.

I want to calculate the date of next satureday of current date using shell script. Suppose, today is 27-feb-08 I want to get the date of next satureday, which means 01-mar-08, in the formate '' YYMMDD ". I do this in ksh.. Please tell me any type of command which help me out. Thanks in... (3 Replies)
Discussion started by: rinku
3 Replies

2. Shell Programming and Scripting

Calculate Date from shell script

I have a txt file which now has the following output Sat Mar 6 04:00:01 Sat Mar 6 04:02:09 processing 585 Sat Mar 6 17:00:01 Sat Mar 6 17:00:58 processing 109 Sun Mar 7 04:00:01 Sun Mar 7 04:00:51 processing 309 Sun Mar 7 17:00:01 Sun Mar 7 17:00:41 processing 48 I want output as... (1 Reply)
Discussion started by: gubbu
1 Replies

3. Shell Programming and Scripting

Shell Script to compare files, check current date and count

Hello - I have written the following basic shell script to count files, compare files and look for a particular strings in a file. Problem 1: How do I define more than 1 file location? #!/bin/bash #this is a test script FILES=$(ls /home/student/bin/dir1, home/student/bin/dir2)... (0 Replies)
Discussion started by: DallasT
0 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. Shell Programming and Scripting

Date One Week Ago From Given Date, Not From Current Date

Hi all, I've used various scripts in the past to work out the date last week from the current date, however I now have a need to work out the date 1 week from a given date. So for example, if I have a date of the 23rd July 2010, I would like a script that can work out that one week back was... (4 Replies)
Discussion started by: Donkey25
4 Replies

6. Shell Programming and Scripting

How to Get 60 days Old date from current date in KSH script

Hi i am writing a cron job. so for it i need the 60 days old date form current date in variable. Like today date is 27 jan 2011 then output value will be stote in variable in formet Nov 27. i am using EST date, and tried lot of solution and see lot of post but it did not helpful for me. so... (3 Replies)
Discussion started by: Himanshu_soni
3 Replies

7. Shell Programming and Scripting

Substracting days from current date(K shell script)

Hi, I want to subtract 'n' days from the current timestamp in a k shell script. Is there any inbuilt function to do it or any workaround solution to get the date. And I want the output to be in YYYY:MM:DD HH:MM:SS format. Please help. Thanks in advance. (4 Replies)
Discussion started by: Suryaaravindh
4 Replies

8. Programming

Calculate the current date.

Give your an integer (e.g. 0x0076f676) representing the number of minutes elapsed since January 1, 1996. How to calculate the current date which format should be "year-month-day-hour-minutes" ? (3 Replies)
Discussion started by: qcmao
3 Replies

9. Shell Programming and Scripting

Shell script to check current date file is created and with >0 kb or not for multiple directories

Hi All, I am new in scripting and working in a project where we have RSyslog servers over CentOS v7 and more than 200 network devices are sending logs to each RSyslog servers. For each network devices individual folders create on the name of the each network devices IP addresses.The main... (7 Replies)
Discussion started by: Pinaki
7 Replies

10. UNIX for Beginners Questions & Answers

UNIX script to replace old date with current date dynamically in multiple files present in a folder

I am trying to work on a script where it is a *(star) delimited file has a multiple lines starts with RTG and 3rd column=TD8 I want to substring the date part and I want to replace with currentdate minus 15 days. Here is an example. iam using AIX server $ cat temp.txt RTG*888*TD8*20180201~... (1 Reply)
Discussion started by: Shankar455
1 Replies
XCALEV(1)						      General Commands Manual							 XCALEV(1)

NAME
xcalev - load xcal calendar files with regular dates SYNTAX
xcalev [ -r ][ -x ][ -f file ][ -d dir ][ year ] DESCRIPTION
Xcalev is used to preload the calendar files for the xcal program with regular events in your life. It reads lines from a file (usually called regular stored in your Calendar directory. Each line in the file contains three fields separated by spaces or tabs, these are: a month name, a day in the month and some text. For example: December 25 Christmas Dec 31 New Year's Eve The order of the month and the day are optional, the program deduces the day by looking whether the string contains an initial numeric character or not. The year defaults to the current year unless the program is given a year number as an argument. This year cannot be abbreviated to two digits because xcal deals with years from year zero. There's a rough validity check on this. The string from the data line is inserted in the appropriate file and will appear in your xcal date strip. Nothing will happen if the string already exists in the file for that day. This means that it's safe to run xcalev at any time, only the strings that have altered in the regular file will be updated. To help with entering the same event for a number of days in one month, you can give a day range with a hyphen Jan 16-21 Usenix SF If you supply the -r option, xcalev will delete all the matching strings that it finds in the appropriate daily file. So, if you want to make radical changes to the regular file, you should run xcalev with the -r option to remove all the current entries from one year, edit the regular file and run xcalev to reload things. OPTIONS
The -r option makes xcalev delete rather than append entries. The -x option makes xcalev operate with Calendar files that are compatible with the xcalendar program. The -f switch is followed by a filename gives an alternative name for the regular file. If the filename does not start with a slash or a dot, then the name of your Calendar directory will be prepended to it. The -d switch is followed by a directory name and specifies an alterative location for your Calendar directory. Your home directory is prepended if the name doesn't start with a slash or a dot. FILES
$HOME/Calendar/* xc<dd><Mon><Year> A data file is day, Month in three letter format and the year. xy<Year> A year directory. xw<Day> A data file for the weekly code, one per day. SEE ALSO
xcal(1), xcalpr(1), xcal_cal(1) AUTHOR
Copyright 1993 by Peter Collinson, Hillside Systems All rights reserved. X Version 11 R5 October 1993 XCALEV(1)
All times are GMT -4. The time now is 10:23 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy