1836528 Members
3837 Online
110101 Solutions
New Discussion

create config file

 
Ragni Singh
Super Advisor

create config file

Hey everyone. I would like some assistance creating a config file with these in it. How would once create this.

logfile name
mode of logfile & archives
number of archives
size of archives
archive interval

Any help will be greatly appreciated and points will be given.
2 REPLIES 2
James R. Ferguson
Acclaimed Contributor

Re: create config file

Hi:

I think the more appropriate question would be how do you want to extract and use this information.

An easy way (planning to use 'cut' or 'awk') would be to put all of the variables on a single line with a delimiter like a colon (":").

I'd plan to be able to parse the file ignoring blank lines and/or ones with "#" characters as their first character denoting comments. After all, you might want to document the order of the fields! ;-)

Regards!

...JRF...
John Strang
Regular Advisor

Re: create config file

You should also include a Date field somewhere.

How often will your file be updated, and how many lines will it have? If it's going to be regularly updated you should write a script to be run by cron.

Just a few thoughts,

John
If you never make a mistake you'll never make anything.