## Keeping the format ...

Keeping the format ...
# 8
02-01-2002
Thanks heaps guys.
Will try to implement it when I go back to work later today.
 Cameron View Public Profile for Cameron Find all posts by Cameron
# 9
02-27-2002
Guys,

It's working great and I'm using Ksh for the script.

One quick question; is it possible to convert a Jullian date to a formatted date??

Ie : Jullian Date = 032
Formatted Date = 01/02/2002
 Cameron View Public Profile for Cameron Find all posts by Cameron
# 10
02-27-2002
I know it can be done, but I can't work out the logic for it... I'm not too hot at math logic.

Perderabo, any gems to contribute?
 LivinFree View Public Profile for LivinFree Find all posts by LivinFree
# 11
02-27-2002
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.

Here is a page that discusses the real meaning of Julian Day. And here is Julian Day Calculator.

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:
 Perderabo View Public Profile for Perderabo Find all posts by Perderabo
# 12
02-28-2002
My solution....

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...
 Cameron View Public Profile for Cameron Find all posts by Cameron
# 13
02-28-2002
Ahh, just a smal oversite with the above script - an error.

The line ...
while [ \$xj31date -lt \$xpjdate ] ; do
while [ \$xj31date -le \$xpjdate ] ; do

I only stpotted the error when the emails were missing the last day of the month - doh!
 Cameron View Public Profile for Cameron Find all posts by Cameron
# 14
03-05-2002
Quote:
Originally posted by Perderabo

Converting a Julian Day Number to a date is rough but it can be done.
Yep. Check out a previous thread where I posted a script to convert to & from julian date values.
 PxT View Public Profile for PxT Find all posts by PxT

Test Your Knowledge in Computers #692
Difficulty: Medium
In 1995, the Santa Cruz Operation (SCO) acquired UnixWare from Novell.
True or False?

## Replace some strings keeping others

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}...

## Keeping the number intact

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...

## Replace date value with another value keeping all as is

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....

## Keeping last part

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...

## Help with file editing while keeping file format intact

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...

## keeping a process alive ?

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.

## keeping systems updated

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

## Script Keeping Track of Itself

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...

## keeping history of command

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