10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am trying to change dates in a bash script.
I have a start time and an endtime and want to increment the times. Basically
the month and day have to be incremented in a loop to create two strings, stm and
etm defining the start and end times.
stm="2014-05-13T00:00:00"... (4 Replies)
Discussion started by: novilatte
4 Replies
2. Shell Programming and Scripting
Hello Guys,
Just joined today with a simple task i guess.
I need to write a shell script which takes input from users which is a date and should be able to compare the date differences between the dates keeping in mind the leap year and all.
Kindly Guide :) :D (9 Replies)
Discussion started by: barryallen
9 Replies
3. UNIX for Beginners Questions & Answers
Hi,
I am trying to add few (say 3 days) to sysdate using -
date -d '+ 3 days' +%y%m%d
and it works as expected.
But how to add few (say 3 days) to a literal date value and how bash treats a literal value as a date. Can we say just like in ORACLE TO_DATE that my given literal date value... (2 Replies)
Discussion started by: pointers1234
2 Replies
4. Shell Programming and Scripting
Hi All,
I'm having the following script:
#!/bin/bash
date=$(date +%d)
echo $date
if ;
then
echo 'date is even'
else
echo 'date is odd' (4 Replies)
Discussion started by: zarere
4 Replies
5. Shell Programming and Scripting
Hello all,
I'm trying to substract 1 minute from the current date and take the hour and minute (for filename purpose).
1) If I want hour an minute from current time I can use:
timetmp=$(date +"%H:%M")
2) To substract 1 minute from current time I can use:
timetmp=$(date --date "$dte -1... (8 Replies)
Discussion started by: Lord Spectre
8 Replies
6. Homework & Coursework Questions
1. The problem statement, all variables and given/known data:
I have standard web server log file. It contains different columns (like IP address, request result code, request type etc) including a date column with the format .
I have developed a log analysis command line utility that displays... (1 Reply)
Discussion started by: TariqYousaf
1 Replies
7. Shell Programming and Scripting
Hi
I have this simple script:
#!/bin/bash
date1=2009:07:15:12:36
date2=2009:07:15:12:16
echo $date1
echo $date2
datediff=
#datediff=date1-date2
echo datediff is$datediff
How do i return the difference in seconds? (6 Replies)
Discussion started by: carp.dk
6 Replies
8. UNIX for Dummies Questions & Answers
hi guys.
in bash is there any other way of limiting the time displayed to HH:MM
appart from
(date +"%H:%M") and (date +"%R")?
i want to input time into a database in the form HH:MM
have tried NOW() but this gives me HH:MM:SS
thanks in advance (1 Reply)
Discussion started by: vadharah
1 Replies
9. UNIX for Dummies Questions & Answers
Cound anyone help me on how to compare date in Unix using if function on bash file?
current=date
if ###syntax is wrong, could anyone correct it for me
then
rm -rf /usr/local/src
fi
Thank You... (17 Replies)
Discussion started by: Stanford Co
17 Replies
10. UNIX for Advanced & Expert Users
Hi,
Can we get code of a particular day from the Clearcase?
If it is possible how we can do it? What is the method?
- Push (2 Replies)
Discussion started by: pushpagiri
2 Replies