10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have a requirement where I have to pass Date to a script and get the day from it.
Ex If parameter is 2015-09-29
The output should be Tuesday.
Can you please tell me how to get that? (6 Replies)
Discussion started by: ashwin3086
6 Replies
2. Shell Programming and Scripting
hello,
I have many files called day001, day002, day003 and I want to rename them by day20070101, day20070102, etc.
I need to do it for several years and leap years as well.
What is the best way to do it ?
Thank you. (1 Reply)
Discussion started by: Ggg
1 Replies
3. Shell Programming and Scripting
Hello All,
I have a below data in a .csv file where all rows where col1 is A, col2 is odd numbers, similarly even numbers for all rows where col1 is B.
Note that my data has some other columns(not shown here) too (around 100) after col2.
Tool,Data
A,1
A,3
A,5
....
so on
B,2
B,4
.... ... (4 Replies)
Discussion started by: ks_reddy
4 Replies
4. Shell Programming and Scripting
Hi,
How can I convert day of year value in format(yy,doy) to normal formatted (dd.mm.yyyy) string also all of them with awk or awk system function?
in_file.txt
---------
12,043
12,044
12,045
12,046
out_file.txt
----------
12.02.2012
13.02.2012
14.02.2012
15.02.2012
imagine... (5 Replies)
Discussion started by: kocaturk
5 Replies
5. Shell Programming and Scripting
Hi , I need to convert date from YYYYMMDD to DD-MON-YYYY
e.g
20111214 to 14-Dec-2011
Please help. (17 Replies)
Discussion started by: ady_koolz
17 Replies
6. Shell Programming and Scripting
Hello,
I am writing a script that parses different logs and produces one. In the source files, the date is in DD MM YYYY HH24:MI:SS format. In the output, it should be in DD MON YYY HH24:MI:SS (ie 25 Jan 2010 16:10:10)
To extract the dates, I am using shell substrings, i.e.:
read line
... (4 Replies)
Discussion started by: Adamm
4 Replies
7. 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
8. Shell Programming and Scripting
Can't find out how to get the day of the week from a given date, anyone got a code snippet that could help please?
Ta!! (4 Replies)
Discussion started by: couponmeup
4 Replies
9. Shell Programming and Scripting
How to convert the date field from dd/mm/yyyy to yyyy/mm/dd in unix
my script will generate text file which have two fields
one is date and another is name of the server for example this is sample date which I have to sort based on older to newer date the problem is when I found out sort will... (4 Replies)
Discussion started by: pareshan
4 Replies
10. Shell Programming and Scripting
I am writing some PERL code (and I realize this is a UNIX forum), but was wondering if anyone has a quick routine (PERL or shell scripting) to take a date in YYYYMMDD format and return the 3 digit Julian number.
For instance, my program will have a variable called "$Settlement_Date" and will... (5 Replies)
Discussion started by: dfran1972
5 Replies