10 More Discussions You Might Find Interesting
1. Red Hat
Hi,
These are the list of files in one directory in the server :
# ls -lrt
total 10120
-rw-r--r-- 1 root root 4484 Jul 8 2011 install.log.syslog
-rw-r--r-- 1 root root 51890 Jul 8 2011 install.log
-rw------- 1 root root 3140 Jul 8 2011 anaconda-ks.cfg
drwxr-xr-x 2 root root... (2 Replies)
Discussion started by: anaigini45
2 Replies
2. Shell Programming and Scripting
Hello,
I am not able to find how to compare two dates in '%Y-%m-%d %H:%M:%S,%3N' format
i have to two dates as below
date1="2016-08-24 09:47:40,444"
date2="2016-08-24 10:45:40,567"
how to compare these two dates ?
I have tried below without success
if ; then echo 'yes'; fi
... (6 Replies)
Discussion started by: Ramneekgupta91
6 Replies
3. UNIX for Dummies Questions & Answers
Hi All,
I am coding for a requirement where I need to read a file & get the values of SUB_DATE. Once the dates are found, i need to move the files based on these dates from one directory to another.
ie, this is how it will be in the file,
SUB_DATE = 20120608,20120607,20120606,20120606... (5 Replies)
Discussion started by: dsfreddie
5 Replies
4. UNIX for Dummies Questions & Answers
Hi all.
I have 2 files like these:
file1
3 -2 5 4 . . .
3 3 3 4 . . .
2 2 3 4 . . .
3 -2 8 4 . . .
file2
0.4242 2 3 4 . . .
2.562 7 3 4 . . .
0.7242 5 5 4 . ... (3 Replies)
Discussion started by: t_studen_t
3 Replies
5. Shell Programming and Scripting
Hi All,
I have some folder that are named "FOLDERYYYYMM". I'm trying to piece together a .sh script that will look for the folder with the date. How can I get shell to see the date? (3 Replies)
Discussion started by: bbbngowc
3 Replies
6. Shell Programming and Scripting
I have a text file in which holidays are listed as YYYYMMDD. Here is the sample data of the file.
20090911
20090912
20090913
I need to read this file and see if the current day is listed in this text file. If today and any of the rows in my text file match, I need to do further... (2 Replies)
Discussion started by: Pramodini Rode
2 Replies
7. Shell Programming and Scripting
Sorry, couldn't really think of a simple subject/title.
So, I have a log file, and the dates are displayed like so:
2009-03-05 02:49:44
So the first and second field are the date/time. I can change them into a unix timestamp easily with:
date -d "2009-03-05 02:49:44" +%s
However,... (17 Replies)
Discussion started by: Rhije
17 Replies
8. UNIX for Dummies Questions & Answers
Hi all,
We have an existing script:
find /u03/oraprod/perpcomn/admin/out -type f -ctime +7 \
-exec cp {} "/u08/oraprod/backup/cout" \;
Which is to find all files more than 7 days and copy to another folder. However I would like to only list files with Sep 29, and cp to another folder.
... (2 Replies)
Discussion started by: *Jess*
2 Replies
9. Shell Programming and Scripting
Hi guys,
I am new to AWK and unix scripting. Please see below my problem and let me know if anyone you can help.
I have 2 input files (example given below)
Input file 2 is a standard file (it will not change) and we have to get the name (second column after comma) from it and append it... (5 Replies)
Discussion started by: sksahu
5 Replies
10. Shell Programming and Scripting
Hi there,
I am trying to find out a way to calculate how many hours are between 2 dates but from a specific time range, actually working hours (Monday to Friday 09:00 - 18:00).
What I mean is for example
date1 = Monday 21 July 2008 22:00:00 so in python 2008-07-21 22:00:00
date2 = Wednesday... (5 Replies)
Discussion started by: sickboy
5 Replies