10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I all
I have written a bash script for compare two date. One of those is a result of query, and another is current date.
I have a problem with the format, because the first is 09/12/19 18:50:30 but for having this result I have to do
d1DB=$(date -d "$valData" +'%m/%d/%y %T')
and the second... (9 Replies)
Discussion started by: rdie77
9 Replies
2. UNIX for Beginners Questions & Answers
Hi everyone
I need some help
I want to create an script which does some processing
it takes the two arguments 201901010000 and 201901020200 - so YYYMMDDHHMM
I want to split processing into hours from start until end,
I dont get why this works but when I add to a future variable... (1 Reply)
Discussion started by: kl1ngac1k
1 Replies
3. 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
4. Shell Programming and Scripting
Hi everyone,
I have a situation in which I have multiple (3 at last count) date columns in a CSV file (, delim), which need to be changed from:
January 1 2017 (note, no comma after day)
to:
YYYY-MM-DD
So far, I am able to convert a date using:
date --date="January 12, 1990" +%Y-%m-%d
... (7 Replies)
Discussion started by: richardsantink
7 Replies
5. UNIX for Beginners Questions & Answers
Hi, I'm looking to accomplish the following.
Insert current date into three places/cells within a cvs, every time the bash script is executed.
The cells are column A,B,C row 2. Row 1 is reserved for the headers.
The file name is always orders.csv. These three cells we always have an old... (1 Reply)
Discussion started by: Rookievmc
1 Replies
6. Shell Programming and Scripting
Hi Again,
I have a file that contains date and time for the past 2 hours. What i need is add missing date and time in a file.
INPUT
2016-01-13 01:33 10
2016-01-13 01:31 10
2016-01-13 01:30 10
2016-01-13 01:29 10
2016-01-13 01:28 10
2016-01-13 01:27 10
2016-01-13 01:26 10
2016-01-13... (14 Replies)
Discussion started by: ernesto
14 Replies
7. UNIX for Dummies Questions & Answers
Hi Experts
I'm struggling with the dates in bash scripting.
here is my code
due1=`grep "$member" Due.txt | tail -n 1 | cut -d "," -f2 | tr -d "\15"`
duedate1=`date +%Y-%m-%$due1`
echo $due1
echo $duedate1
if I execute the above code
I get output as
10
2013-09 %10
... (2 Replies)
Discussion started by: parpaa
2 Replies
8. Shell Programming and Scripting
Hi,
Below is my bash script:
cat run_all.sh
if && ; then
Number_Count_Program $1.results $2.results > $1.$2.counts
else
Number_Split_Program $1.results $2.results > $1.$2.split
fi
After I run the following command:
./run_all.sh A B
./run_all.sh: line 1:
Anybody advice to edit... (5 Replies)
Discussion started by: perl_beginner
5 Replies
9. UNIX for Dummies Questions & Answers
Hi Experts,
We get "Day" of a month in a variable, so how to make date of out it?
To make more sense
if my variable $DAY contains "12" and month and year will be current date (as of today)
so I want to see as output as 2013-09-12.
How can I achive this bash script??
Any help is... (4 Replies)
Discussion started by: parpaa
4 Replies
10. Shell Programming and Scripting
Hi all,
I need a script to do some date/time conversion. It should take as an input a particular time. It should then generates a series of offsets, in both hour:minute form and number of milliseconds elapsed.
For 03:00, for example, it should give back 04:02:07 (3727000ms*) 05:04:14... (2 Replies)
Discussion started by: emdan
2 Replies