ok so i am writing in VI.
Basically i am writing a script which does the following
1.) creates a file name as:
`hostname.`date '+%d%m%y_%H%M'.1.html
2.) echos some html tags >> to the same file name
3.) takes info from command showrev -p and then >> to the same file
4.) echos closing html tags and then >> to the same file
The issue is, This is for log keeping purposes, so i want to include the time, so that when the time changes the patch info will be spit into files per data/time for easy referencing. but if the script runs between changes in time i get two halves of the file seperate instead of 1 complete file
work around?
---------- Post updated at 01:29 PM ---------- Previous update was at 12:37 PM ----------
OK i guess im being too vague... lemme type this beast out...
#! /bin/ksh
touch `hostname`.`date '+%d%m%y_%Hhr%Mmin'`.PATCHES.html
echo "<html><body><pre width=pahe>" >>`hostname`.`date '+%d%m%y_%Hhr%Mmin'`.PATCHES.html
echo "PATCHES" >>`hostname`.`date '+%d%m%y_%Hhr%Mmin'`.PATCHES.html
echo "----------" >>`hostname`.`date '+%d%m%y_%Hhr%Mmin'`.PATCHES.html
showrev -p >>`hostname`.`date '+%d%m%y_%Hhr%Mmin'`.PATCHES.html
echo "</pre></body></html>" >>`hostname`.`date '+%d%m%y_%Hhr%Mmin'`.PATCHES.html
SO my problem again is it makes 2 files during the time change, How can i redirect the info into the file just created. Do i need to set the time of the script running to a variable, then reference the file redirect to the variable? or should i just be lazy and drop the time portion of date all togather.
Work around?