First of all, we seem to be talking about "Day of Year" here rather than "Julian Date". I know it's pro forma for programmers to mix the two up, but to get this right we have to be precise.
Converting a Julian Day Number to a date is rough but it can be done. Converting a Day of Year" to a date is impossible. We must also have the year. We need the year both so that we can display it and to determine if we are dealing with a leap year. Here is a script that takes to parameters, the year and the day of year and converts them to a date:
This is my solution & works great.
Unfortunately I hadn't started gathering stats on the systems this macro is running on since the 16th January.
The scary part is that it took me less than a shift to finish. Note: This script is intended to run only on the 1st of any month.
And a sample of the output...
I want to replace strings in test2 according to test1 table. In doing so, I`m losing records that I dont need to replace, please suggest modifications.
what i have
$ cat > test1
a b
c d
$ cat > test2
a
a
a
d
d
what i tried
$ awk ' BEGIN {FS=OFS=" "} FNR==NR{a=$2;next}... (2 Replies)
Currently I have the following to separate the numeric values. However the decimal point get separated.
ls -lrt *smp*.cmd | awk '{print $NF}' | sed 's/^.*\///' | sed 's/\(*\)/ & /g'
As an example on the files
n02-z30-dsr65-terr0.50-dc0.05-4x3smp.cmd... (8 Replies)
Hi forum.
How do I change the following date value with another value (while keeping the rest of the line) using sed? The date values can change so I need a general sed command to change the date value within the first quotation marks only.
Date values will be coming from 2 different files.... (2 Replies)
Hello,
Sorry for the poor tilte but I still don't know how to this.
Here is my problem.
I have to huge log file. In this log file I can know where is stored all my files. As I have to get a reporting of of files I only need to keep the file name but I don't know how to do it. I hope you... (5 Replies)
Hi,
I am having a file which is fix length and comma seperated. And I want to replace values for one column.
I am reading file line by line in variable $LINE and then replacing the string.
Problem is after changing value and writing new file temp5.txt, formating of original file is getting... (8 Replies)
Hello guys, I have one script running that I need to keep it running 24x7 so I'd like to know how can I implement a sort of monitoring process I mean if for some reason this process dies somehow it gets automatically started again.
Thanks. (8 Replies)
I have several RHEL systems that are on an isolated network so I can't run up2date or yum directly on them.
What is the best way to keep these systems updated and patched?
Thanks (4 Replies)
Hi All
We have a WEB Based application running on the IBM AIX server. There is a EOD Job which runs a UNIX script containing EOD Jobs. Say If any job fails then we have to explicitly comment out the jobs which were successfully executed and then re run the same.
Is there any was by which we... (7 Replies)
hi
can anyone tell me how or where to set to enable history of command keyed in to be logged? so that it can be used or traced later.
thanks (3 Replies)