10-11-2019
Replace date in file every day with current date
I Have text like
XXX_20190908.csv.gz need to replace Only date in this format with current date every day
Thanks!
Last edited by vbe; 10-11-2019 at 05:31 AM..
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
I want to check what day is today (like mon,Tue,wed)
When i checked the syntax, i dont see there is a format specifier for getting the day. Let me know how to get the same.
I am very new to unix and so I am asking some basic questions.
cheers,
gops (2 Replies)
Discussion started by: gopskrish
2 Replies
2. Shell Programming and Scripting
I need to extract the date part from the file name (20080221 in this ex) and compare it with the current date and delete it, if it is a past date.
$file = exp_ABCD4_T-2584780_upto_20080221.dmp.Z
really appreciate any help.
thanks
mkneni (4 Replies)
Discussion started by: MKNENI
4 Replies
3. Shell Programming and Scripting
Hi guys,
I know if I try to get a julian date using a specific date I can but I try to get the current date I got an error as you can see below:
This one works fine:
date -d "2010/10/30" +%j
But I can't get the current date as below:
`date -d "+%Y/%m/%d`" +%j
Does somebody can... (6 Replies)
Discussion started by: edudiogo
6 Replies
4. Shell Programming and Scripting
Hi guys,
I had a scenario...
1. I had to get the previous days date in yyyymmdd format
2. i had to create a file with Date inthe format yyyymmdd.txt format
both are different
thanks guys in advance.. (4 Replies)
Discussion started by: apple2685
4 Replies
5. UNIX for Dummies Questions & Answers
Hello gurus,
I am hoping someone can help me with the required code/script to make this work. I have the following file with records starting at line 4:
NETW~US60~000000000013220694~002~~IT~USD~2.24~20110201~99991231~01~01~20101104~... (4 Replies)
Discussion started by: chumsky
4 Replies
6. Shell Programming and Scripting
Hi Guys,
I have a file with following content
From 20121014 : To 20121014
Number of days : 1
1234
1245
1246
1111
Everyday i run my script i want to modify "To" date on the first line with current date. I have set the current date in script as
RUN_DATE=`date -u +%Y%m%d`
So i want... (9 Replies)
Discussion started by: jakSun8
9 Replies
7. UNIX for Beginners Questions & Answers
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
8. UNIX for Beginners Questions & Answers
We want to call a parameter file (.txt) where my application read dynamic values when the job is triggered, one of such values are below:
abc.txt
------------------
Code:
line1
line2
line3
$$EDWS_DATE_INSERT=08-27-2019
line4
$$EDWS_PREV_DATE_INSERT=08-26-2019
I am trying to write a... (3 Replies)
Discussion started by: pradeepp
3 Replies
9. UNIX for Beginners Questions & Answers
Hello All,
we what we call a parameter file (.txt) where my application read dynamic values when the job is triggered, one of such values are below:
abc.txt
------------------
line1
line2
line3
$$EDWS_DATE_INSERT=08-27-2019
line4
$$EDWS_PREV_DATE_INSERT=08-26-2019
I am trying to... (1 Reply)
Discussion started by: pradeepp
1 Replies
10. UNIX for Beginners Questions & Answers
Hi, I need the first & last day of a month from any given date. For better understanding, if i need to back-fill data for date 07/20/2019 i.e July 20 2019, i need the first & last day has 07/01/2019 - 07/31/2019. FYI: I'm using GIT BASH terminal.
sample code:
export DT=$(date --date='6 days... (2 Replies)
Discussion started by: Rocky975583
2 Replies
DDATE(1) Emperor Norton Utilities DDATE(1)
NAME
ddate - converts Gregorian dates to Discordian dates
SYNOPSIS
ddate [+format] [date]
DESCRIPTION
ddate prints the date in Discordian date format.
If called with no arguments, ddate will get the current system date, convert this to the Discordian date format and print this on the stan-
dard output. Alternatively, a Gregorian date may be specified on the command line, in the form of a numerical day, month and year.
If a format string is specified, the Discordian date will be printed in a format specified by the string. This mechanism works similarly to
the format string mechanism of date(1), only almost completely differently. The fields are:
%A Full name of the day of the week (i.e., Sweetmorn)
%a Abbreviated name of the day of the week (i.e., SM)
%B Full name of the season (i.e., Chaos)
%b Abbreviated name of the season (i.e., Chs)
%d Ordinal number of day in season (i.e., 23)
%e Cardinal number of day in season (i.e., 23rd)
%H Name of current Holyday, if any
%N Magic code to prevent rest of format from being printed unless today is a Holyday.
%n Newline
%t Tab
%X Number of days remaining until X-Day. (Not valid if the SubGenius options are not compiled in.)
%{
%} Used to enclose the part of the string which is to be replaced with the words "St. Tib's Day" if the current day is St. Tib's Day.
%. Try it and see.
EXAMPLES
% ddate
Sweetmorn, Bureaucracy 42, 3161 YOLD
% ddate +'Today is %{%A, the %e of %B%}, %Y. %N%nCelebrate %H'
Today is Sweetmorn, the 42nd of Bureaucracy, 3161.
% ddate +"It's %{%A, the %e of %B%}, %Y. %N%nCelebrate %H" 26 9 1995
It's Prickle-Prickle, the 50th of Bureaucracy, 3161.
Celebrate Bureflux
% ddate +'Today's %{%A, the %e of %B%}, %Y. %N%nCelebrate %H' 29 2 1996
Today's St. Tib's Day, 3162.
BUGS
ddate(1) will produce undefined behaviour if asked to produce the date for St. Tib's day and its format string does not contain the St.
Tib's Day delimiters %{ and %}.
NOTE
After `X-Day' passed without incident, the Church of the SubGenius declared that it had got the year upside down - X-Day is actually in
8661 AD rather than 1998 AD. Thus, the True X-Day is Cfn 40, 9827.
AUTHOR
Original program by Druel the Chaotic aka Jeremy Johnson (mpython@gnu.ai.mit.edu)
Major rewrite by Lee H:. O:. Smith, KYTP, aka Andrew Bulhak (acb@dev.null.org)
Five tons of flax.
DISTRIBUTION POLICY
Public domain. All rites reversed.
SEE ALSO
date(1),
http://www.subgenius.com/
Malaclypse the Younger, Principia Discordia, Or How I Found Goddess And What I Did To Her When I Found Her
59 Bureaucracy 3161 DDATE(1)