10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi, please can somebody let me know the easiest way to add days to a date.
I can do this in perl but would like to able to do it in a shell script.
Desired output would be:
date +'%Y-%m-%d' + 10 = 2016-05-02
Thank you (8 Replies)
Discussion started by: andy391791
8 Replies
2. Shell Programming and Scripting
Hi All,
I want to add one day to a date and store it in a variable.
From GUI we are passing value (last day of the month)to $t_date.
This $t_date will give me the value like this %Y%m%d 20150531.
Now I want to add one day to this value and store it in a variable "datein".
datein should... (8 Replies)
Discussion started by: ROCK_PLSQL
8 Replies
3. Shell Programming and Scripting
Hi ,
How can I add/substruct x number of days with date?
For example
My_Date=`date`
Now I need
Hope it's clear. (2 Replies)
Discussion started by: Anupam_Halder
2 Replies
4. Shell Programming and Scripting
I want this:
0.0230769,0.407692,0.307692,0,0.1,1.4,1,0,ADD DATE HERE,
im getting this:
11/02/12
0.00192308,0.0269231,0.0192308,0,0.1,1.4,1,0,
my script:
#!/bin/ksh
DIR=/export/home/yani_m/scripts/scrip_out_put/
DIR2=/export/home/yani_m/scripts/scrip_out_put/calc/
Date=$1... (1 Reply)
Discussion started by: LucyYani
1 Replies
5. UNIX for Dummies Questions & Answers
Hi,
I want to add some hours and minutes to the current date. For example, if the current date is "July 16, 2012 15:20", i want to add 5 hours 30 minutes to "July 16, 2012 00:00" not to "July 16, 2012 15:20". Please help.
Thanks! (4 Replies)
Discussion started by: manojgarg
4 Replies
6. Shell Programming and Scripting
Hi! I am trying to read a file and every line has a specific date as one of its fields.
I want to take that date and compare it to the date today plus 6 days.
while read line
do
date=substr($line, $datepos, 8) #date is expected to be YYYYMMDD
if ; then
...proceed commands
... (1 Reply)
Discussion started by: kokoro
1 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I want to print the number of lines of a file along with filename and today's date.
Ex:
XXX|07-22-2010|8
I am using as
wc -c -l file.txt | awk '{print "XXX|",date +"%m-%d-%Y","|",$1}'
But this one prints as
AAA| 0 | 8
Can anyone please help me on this for printing the date?
... (3 Replies)
Discussion started by: aeroticman
3 Replies
8. Shell Programming and Scripting
i have some files in my directory....wit names say aaa, bbb, ccc,,,,,
i want to make loop so that for each file name,,,,,,a sysdate should be appended in the end.........and the files should look like aaa_20100331
i knw date can be appended as `date +"%Y%m%d"`
but m nt able to make a loop. ... (2 Replies)
Discussion started by: amitpta
2 Replies
9. Shell Programming and Scripting
Hi,
I have a log file with contents like
81.49.74.131 - -
81.49.74.131 - -
116.112.52.31 - -
116.112.52.31 - -
I need an output like this
81.49.74.131 14/Sep/2008 Time duration: 00:06:00
116.112.52.31 15/Sep/2008 Time duration: 00:00:01
Please anyone suggest a script for this.... (1 Reply)
Discussion started by: FuncMx
1 Replies
10. UNIX for Dummies Questions & Answers
I want to add a date to a record which is appended to a file that gets its data from an external source. An explanation:
1. Getting external data: curl http://www.example.com/temperatures.txt
2. Getting the required record: | grep mylocation
3. Appending to file: >> mytemperatures.txt
... (2 Replies)
Discussion started by: figaro
2 Replies